tags:

views:

589

answers:

4

What does the "J" in JApplet mean?

+1  A: 

J stands for Java. The main difference between the JSomeName classes and their "previous" version, is that the J-ones where designed to be used with Swing (or any other graphical toolkit), while the others are from this time where only AWT was available.

gizmo
+12  A: 

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.

TofuBeer
Good try, but I did not manage to find a single bug (at sun) relating such "confusion". I did find however a mention of JClass from (then) KL Group integrated into Swing. So -1.
VonC
[Humor on] Kind of remind me the "guessing really doesn't work as well as looking things up" I took in my face at http://stackoverflow.com/questions/432922/significant-new-inventions-in-computing-since-1980/434650#434650.
VonC
It wasn't a bug... it was maybe on the java usenet groups or release notes or It might have been in a meeting that I had with the JFC team... it was 10 years ago... sorry I cannot remember the exact place I saw it.
TofuBeer
Hmm... looks like I am about to be "Alan Kayed". Again. Alright, in doubt I try and restore the -1 I did this morning on your post ;) But a more precise reference would be nice.
VonC
I have been looking for abut an hour... but cannot find it - which is annoying me! The problem arose when they were converting existing programs from awt to jfc - and you would wind up with two things named Button.
TofuBeer
The reason is sticks in my head was because I was wondering why on earth they didn't fix the compiler to spit out better messages :-)
TofuBeer
And done: -1 canceled, +1 to your answer, and I put mine as a Community Wiki
VonC
updated with a reply to an email to someone at Sun (no I won't give out their name)
TofuBeer
+7  A: 
VonC
And this, ladies and gentlemen, was my ONE thousand answer on StackOverflow! Whoohoo! Champagne and ... What's that, boss ? Where is that latest Findbugs report ? Right. Back to work.
VonC
Ummm... 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 recieved the drop at my company).
TofuBeer
the BWT and the IFC (which became the JFC, which became Swing) were incompatible as well... "Can I use BWT controls in an IFC environment?" http://sciencedesk.arc.nasa.gov/jclass/bwt-doc/faq_bwt.html#bg42
TofuBeer
http://en.wikipedia.org/wiki/Java_Foundation_Classes for a bit more on the history of Swing/JFC/IFC.
TofuBeer
A: 

The J comes after the convention used in Swing classes.

According to the javadoc:

An extended version of java.applet.Applet that adds support for the JFC/Swing component architecture

JFC/Swing architecture is different from AWT architecture.

There are several differences, but the most significant is, AWT uses native code to render widgets ( so does SWT ) while Swing is "light weight" because all the is painted using Java.

So the answer to your question

What does the "J" in JApplet mean?

It means it is an Applet that supports Swing architecture.

I think TofuBeer and VonC are great answers, but they don't address ( at least directly ) your question. Instead they go further explaining why the J in swing components and should not be confused with tons of other J's in front of other classes outside Sun.

OscarRyz