In This Chapter
Examining some basic Swing concepts
Fussing with frames
Creating a simple Swing program
Putting panels in your frames
Looking at labels
Beginning with buttons
Leaping into layout
So far in this book, all the programs have been console-based, like something right out of the 1980s. Console-based Java programs have their place, especially when you're just starting with Java. But eventually you'll want to create programs that work with a graphical user interface, also known as a GUI.
This chapter gets you started in that direction. You use a Java GUI package called Swing to create simple GUI applications that display simple buttons and text labels. Along the way, you find out about two key classes: JFrame and JPanel, which provide the visual ...