O'Reilly logo

Python Programming with the Java™ Class Libraries: A Tutorial for Building Web and Enterprise Applications with Jython by Richard Hightower

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

Adding a Main Window: First Cut

We're going to create the main window for the address book application, which will have the list on the left side of the frame—when the user selects an item, it appears in the AddressForm instance on the right side. To do this we'll convert AddressForm so that it extends java.awt.Panel instead of java.awt.Frame. We'll also need to add some code to initialize the text fields in the AddressForm class (in AddressForm.py) so that every time an address is passed to AddressForm (that is, when the user selects a name in the list), AddressForm shows that Address instance.

Here is a listing of AddressForm in AddressFormPane.py:

 from Address7 import Address ... # AddressForm Class. # This class is used to edit an instance ...

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