To view parent comment, click here.
To read all comments associated with this story, please click here.
Swing is an extension of AWT. AWT widgets are native widgets, somewhat like SWT. AWT, however, uses the lowest common widget scheme where if ALL supported platforms don't implement a certain widget, it isn't included in AWT. SWT implements any widgets not available.
Why is this relevant?
If you see an official widget class, like a text box, you know if it's an AWT or Swing widget by the class name.
TextField is AWT
JTextField is Swing
This way you don't have to resort to fully qualified class names in a Java class if you happen to use both types of widgets in the same class. It also makes things CLEARER.
Also, javax is a "proprietary" non-standard package (.NET's copy of this is called a "namespace") for Java classes.
The more you know. 




Member since:
2006-03-17
"its not like it is confusing or anything"
- it really shouldn't be confusing. But since the object is cleary 'a text box' it's unnecessary (imo) to delcare that it is 'a text box in java' - there is no other 'textbox' object, so why the 'J'? And the consistency doesn't seem to be there with many Java objects (Spinner vs JSpinner? whuh?). Its the little things that make a language acceptable (especially for friends of mine learning their first language). It doesn't make the language unusable, or inferior (like lots of .net advocates claim), but it doesn't help the learning curve (or porting from other languages). Maybe this is Microsoft's fault for not using objects similar to those already written in Java, but I think Sun was trying to make Java 'unique' - with some unforseen consequences. It never 'took over the world' like Sun had promised and advertised.
And, yes, the speed is anemic - and aesthetically, there is much to be desired. The only true saving grace is portability, for now. I simply wish Java had been designed with just a little more ease-of-use in mind regarding the framework, there would be many more Java programmers if they had.