Adding a Toolbar and a Dialog for the Address Book Application
We want to be able to add new addresses to the address list. Essentially, that means two new buttons, Add and Remove, which we'll put in a new panel in the north region of the main frame. (See Figure 14-3.) When the user presses the Add button a dialog pops up. A dialog is like a frame, except that it's modal (i.e., you have to close it before you can continue using your application).
Figure 14-3. The Add and Remove Buttons
The Dialog Class
The dialog class, AddAddressDialog, is in the same module as AddressMain and contains an instance of the AddressForm panel. It extends java.awt.Dialog ...
Get Python Programming with the Java™ Class Libraries: A Tutorial for Building Web and Enterprise Applications with Jython 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.