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

Get Ivor Horton's Beginning Java™ 2, JDK™ 5th 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.