SerializationApp (version 1.0)

 

Introduction

SerializationApp demonstrates use of serialization (of table data) as well as Swing components JTable, JFileChooser, and a few others. JTable can be loaded with data in a number of ways, but the most flexible and effective ways is through the use of an AbstractDataModel. This Java construct must be subclassed and customized to load the JTable with the desired columns and data types to be displayed.

In this program, data is entered row by row with the input screen shown above (records of book purchases with customer information). The user has the options of specifying which file to save this data, which file to display information (using JFileChooser), and then to display this data in a JTable instance. The JTable itself is not editable, which is main shortcoming of this program. I permit data only to be entered by the simple data entry form. Nevertheless, this version of the program was an exercise for me to get familiar with the basics of JTable and it's behavior. The next version of this demo application will allow direct editing of the table without the restrictions of an entry form, and serialization of the data model itself.

 

Deliverables