Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
205 views
in Technique[技术] by (71.8m points)

java - What does the "J" in JApplet mean?

What does the "J" in JApplet mean?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

When Sun started working on Swing they had things like javax.swing.Button. This caused problems for programs that mase use of java.awt.Button. The main issue, if I remember right, was that the compiler error messages were confusing.

Sun decided to prefix all of the Swing components with J to remove this issue.

Originally swing was called JFC - Java Foundation Classes... presumably the J came from that.

IFC from Netscape was the foundation for JFC... the same team developed both.
The team moved from Netscape to Sun.
The J was there at the first source drop to licensees (I was the person why received the drop at my company).

The JClass BWT and the IFC (which became the JFC, which became Swing) were incompatible as well... "Can I use BWT controls in an IFC environment?"

Edit: Response to an email from a member of the Swing team...

"The un-J'd names were already taken by AWT and we thought it useful to use a common prefix to distinguish "components" from other classes in the package."

The already taken part does match with what I said about the compiler, but does not confirm it.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...