AWT vs. Swing Components
The AWT components are designed to take on the “look and feel” of the underlying window system where they are displayed. For applets, this is wherever the browser is running.
- AWT components have peer classes in which they have a specific window implementations.
Swing components are designed to have a fixed “look and feel” on all platforms.
- They are sometimes called lightweight because they are implemented in Java itself. The only peer implementation required is to put up a window and paint it. Thus, swing components are far less prone to windowing system dependency bugs.
The default “platform look and feel”, abbreviated plaf, is Metal. Others are available such as Motif and Windows.For example: UIManager.setLookAndFeel ( plaf );