1

Possible Duplicate:
why import javax.swing.* why not import java.swing.*

This may seem as a stupid question, but why was the Java Swing Framework(a.k.a Java Foundation Classes) put in the javax package instead of the java package like the Abstract Window Toolkit?

import javax.swing.*

instead of

import java.swing.*

What is the difference between java and javax?

Community
  • 1
  • 1
ApprenticeHacker
  • 21,351
  • 27
  • 103
  • 153

2 Answers2

6

The prefix javax is used for a package of Java standard extension.

stacker
  • 68,052
  • 28
  • 140
  • 210
2

Java swing package was not in the first release of java. It's added latter version of java. So it's an extension for java. X stands for extension

nidhin
  • 6,661
  • 6
  • 32
  • 50