Why Use Swing Instead of AWT?

Swing offers many advantages over AWT. First, Swing components are pure Java. They do not depend on any platform-specific code. This not only makes them more portable from one VM implementation to another, it also allows for their look and feel to be changed. Whereas AWT components inherit the look and feel of the native platform, Swing components can be made to look like Windows, CDE Motif, or any other look and feel for which appropriate classes are present.

Second, Swing components follow the MVC pattern more closely than their AWT counterparts. MVC—Model View Controller—is discussed in detail in the next section. Some Swing components such as JTable and JList have model classes (TableModel and ListModel, respectively). ...

Get Borland® JBuilder™ Developer’s Guide 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.