Chapter 20

Oooey GUI Was a Worm

In This Chapter

arrow Swinging into action

arrow Displaying an image

arrow Using buttons and text boxes

There’s a wonderful old joke about a circus acrobat jumping over mice. Unfortunately, I’d get sued for copyright infringement if I included the joke in this book.

Anyway, the joke is about starting small and working your way up to bigger things. That’s what you do when you read Beginning Programming with Java For Dummies, 3rd Edition.

Most of the programs in this book are text-based. A text-based program has no windows; no dialog boxes; nothing of that kind. With a text-based program, the user types characters in the Console view, and the program displays output in the same Console view.

These days, very few publicly available programs are text-based. Almost all programs use a GUI — a Graphical User Interface. So if you’ve read every word of this book up to now, you’re probably saying to yourself, “When am I going to find out how to create a GUI?”

Well, now’s the time! This chapter introduces you to the world of GUI programming in Java.

The Java Swing Classes

Java’s Swing classes create graphical objects on a computer screen. The objects can include buttons, icons, ...

Get Beginning Programming with Java® For Dummies®, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.