5 Years
Discussion Span
Last Post by jwenting

Swing was not part of the first version of Java - which only had java.awt
So originally swing was a java extension.


The javax namespace is usually (that's a loaded word) used for standard extensions, currently known as optional packages. The standard extensions are a subset of the non-core APIs; the other segment of the non-core APIs obviously called the non-standard extensions, occupying the namespaces like com.sun.* or com.ibm.. The core APIs take up the java. namespace.

Not everything in the Java API world starts off in core, which is why extensions are usually born out of JSR requests. They are eventually promoted to core based on 'wise counsel'.

The interest in this nomenclature, came out of a faux pas on Sun's part - extensions could have been promoted to core, i.e. moved from javax.* to java.* breaking the backward compatibility promise. Programmers cried hoarse, and better sense prevailed. This is why, the Swing API although part of the core, continues to remain in the javax.* namespace. And that is also how packages get promoted from extensions to core - they are simply made available for download as part of the JDK and JRE.

-Taken from http://stackoverflow.com/questions/727844/javax-vs-java-package


well...swing is a advanced version of java so we are using javax..it gives extra features and it will provide look and feel..
you can create many attractive web pages using swing


uh, no. You're wrong on all counts there...

ORIGINALLY the javax packages were eXtensions (or some people say eXperimental) to the language which were distributed separately.
Rather than cause all the code that was already using them to break when they were integrated into the core distribution, the package names were kept.

It's a lesson in careful design of your public interfaces, what not to do when designing a naming system :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.