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). ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access