Question: what is the difference between java and javax?
Answer: java packages are base, and javax packages are extensions. Swing was an extension because AWT was the original UI API. Swing came afterwards, in version 1.1. The javax namespace is usually (that's a loaded word) used for standard extensions, currently known as optional packages.