O'Reilly logo

J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software by Art Taylor

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

The TableBrowser.java Application: the dataTableModel Inner Class

Inner classes in Java provide a very useful syntax to obtain the concise encapsulation of the business logic while still maintaining class scope for the contents of the class. The inner class in this example is used to control the table displayed by the GUI. In this case, the class extends the AbstractTableModel class and overrides certain methods so that they return sensible values for this data model.

The getColumnCount and getRowCount methods return a count of the current number of the rows and columns in the model. These methods map directly to the GeneralAggregateVO object (gvo) stored as an instance member of the application.

The getValueAt method takes an integer row and ...

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