O'Reilly logo

Java All-in-One For Dummies, 4th Edition by Doug Lowe

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 1

Swinging into Swing

In This Chapter

arrow Examining some basic Swing concepts

arrow Fussing with frames

arrow Creating a simple Swing program

arrow Putting panels in your frames

arrow Looking at labels

arrow Beginning with buttons

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

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