

2.2.1 AWT PackagesĪWT is huge! It consists of 12 packages (Swing is even bigger, with 18 packages as of JDK 1.8). I have to stress that AWT component classes are now obsoleted by Swing’s counterparts. I shall start with the AWT classes before moving into Swing to give you a complete picture. You can simply reuse these classes rather than re-invent the wheels. Java Graphics APIs – AWT and Swing – provide a huge set of reusable GUI components, such as button, text field, label, choice, panel and frame for building GUI applications. This will take some time to install the software, so you have to restart eclipse in order to see the changes.


JFC consists of Swing, Java2D, Accessibility, Internationalization, and Pluggable Look-and-Feel Support APIs. Swing API, a much more comprehensive set of graphics libraries that enhances the AWT, was introduced as part of Java Foundation Classes (JFC) after the release of JDK 1.1. Most of the AWT components have become obsolete and should be replaced by newer Swing components.Ģ. There are two sets of Java APIs for graphics programming: AWT (Abstract Windowing Toolkit) and Swing.ġ.
