To make your Java applications inviting to today's users, you're going to want to create graphical user interfaces (GUIs) for them.
To do that, you use components from Java's Swing library. And in NetBeans, you have what many consider to be the leading tool for building GUIs using Swing components, the Swing GUI Builder.
So this chapter teaches you the basics of using Swing and the Swing GUI Builder to create user-friendly interfaces, or forms.
Chapter 15
How to develop a form
An
introduction to Swing
460
The user interface for the Future Value
Calculator application
460
The inheritance hierarchy for Swing
components
462
How
to design a form
464
How to create a project for a GUI application
464
How to add a form to a project
464
How to add controls to a form
466
How to set properties
468
Common properties for forms and controls
470
How
to add code to a form
472
How to set the variable name for a control
472
How to create an event handler for a control
474
How to rename or remove an event handler
476
How to enter the code for a form
478
Common methods for controls
480
How to display and center a form
482
The code for the FutureValueFrame class
484
How to validate Swing input data
486
How to display error messages
486
How to validate the data entered into a text field
First, try our books for 90 days. Then, if you aren't completely
convinced that our books are the best ones you've ever used, you can return them for
a full refund...no questions asked.