There are three Java technologies you can use to develop desktop user-interface: Abstract Window Toolkit (AWT), Swing and JavaFX. AWT is an old technology—having been in existence since Java 1.0—that has been replaced by Swing. Swing has been the technology of choice for some time, but it will soon be superseded by JavaFX. JavaFX should be used for new projects. This chapter and the next cover Swing programming and they are only here because there are still a lot of Swing applications out there and you may be tasked with maintaining or extending some of them.
This chapter starts with AWT components, which will be only briefly discussed. Following it are sections on simple Swing components, such as JFrame, JButton, JLabel ...