O'Reilly logo

Ivor Horton's Beginning Java™ 2, JDK™ 5th Edition by Ivor Horton

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 20. Extending the GUI

In this chapter you'll investigate how you can improve the graphical user interface (GUI) for Sketcher. After adding a status bar, you'll be creating dialogs and exploring how you can use them to communicate with the user and manage input. Another GUI capability you'll be looking at is context menus, which are pop-up menus that vary depending on the context in which they are displayed. You'll be using context menus to enhance the functionality of the Sketcher application. All of this will give you a lot more practice in implementing event listeners, and much more besides.

In this chapter you'll learn:

  • How to create a status bar

  • How to create a dialog

  • What a modal dialog is and how it differs from a non-modal dialog

  • How to create a message box dialog

  • How you can use components in a dialog to receive input

  • What a pop-up menu is

  • How you can apply and use transformations to the user coordinate system when drawing on a component

  • What context menus are and how you can implement them

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