Why does Swing import AWT packages?

James Outlaw

Swing is an extension of the AWT toolkit, not an entirely new implementation. If you take a look at the class hiearchy for any swing object, you will see that it is, ultimiately, a subclass of java.awt.Component. For Example: Here's the hiearchy for JButton: Object->Component->Container->JComponent->AbstractButton->JButton (from JFC In a Nutshell, Flanagan, 1999 (O'Reilly)).