11Designing Graphical Interfaces

WHAT YOU WILL LEARN IN THIS CHAPTER:                

  • The types of graphical user interface frameworks that exist in Java
  • How you can make programs with a graphical user interface
  • Understanding the containment hierarchy, layout managers, and events in a GUI context
  • Using best practices when building graphical user interfaces

WROX.COM CODE DOWNLOADS FOR THIS CHAPTER

The wrox.com code downloads for this chapter are found at www.wrox.com/go/beginningjavaprogramming on the Download Code tab. The code is in the Chapter 11 download and individually named according to the names throughout the chapter.

Up until now, all the programs you’ve been working with throughout this book have been rather Spartan looking. Since most of the action happened on a command-line (or the Eclipse console), you might be wondering whether it is possible to give your programs a bit more visual flair, and, more importantly, make them more useful by means of adding some buttons or a textbox or two.

Luckily, Java provides a wide range of capabilities to work with graphical user interfaces—commonly abbreviated as GUIs—out of the box. Trying to come up with your own GUI classes from scratch would take you many years. This also means, however, that working with GUIs in Java is less straightforward than just dealing with input and output through the console, and constructing visual-rich programs will take up many more lines of code as well. As you might expect, all the components ...

Get Beginning Java Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.