O'Reilly logo

Java: A Beginner’s Tutorial, 4th Edition (Updated for Java SE 8) by Budi Kurniawan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 22

Swing Basics

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required