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

Putting Things Together—Adding a Table Model to the Address Book Application

In this section, we'll add a table model to the address book application and “swingify” some of the application's AWT ways.

AWT to JFC

The first time I wrote the address book application, I used all of the old AWT components (java.awt.Frame, java.awt.Panel, etc.). When I modified it, only 12 lines out of 114 had to be changed, and 9 of those dealt with JList.

The point is that the move from List to JList changed a lot, although most of the changes weren't needed. Other JFC/AWT components map nicely even though they're not closely related on the class hierarchy. Luckily, JList is the exception, not the rule.

Up to now what we've seen of JFC/Swing is pretty much the same ...

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