The Swing API

As mentioned previously, the AWT was the original GUI API for Java. Though adequate for some tasks, the AWT had issues such as the somewhat sluggish performance of the components and a lack of some of the more common controls available in other GUI APIs. At a time when PC CPUs were running at a much slower clock rate, the performance of the interpreted Java language running a slow GUI made Java with AWT a difficult choice. While other GUIs provided combo boxes and sliders and 3D buttons—AWT had none of these.

The introduction of the Swing API addressed many of these issues. Swing builds partly on AWT, using the same layout and event-handling framework. But Swing also addresses performance by replacing many of the heavyweight AWT ...

Get J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.