The JFormattedTable bean provides a view of objects from a data model that organizes objects in a two-dimensional table format. It has the same behavior as the Swing JTable but, as an extra feature, it recognizes the JFormattedTableColumn and checks whether this column is editable or not.
JFormattedTable supports edit code, edit word, formatting, and verification capabilities for iSeries data, based on each table column. To allow for these capabilities, use the JFormattedTableColumn bean inside a JFormattedTable bean and specify one of the following JFormatted cell editors or renderers for the column:
By default, the JFormattedTable bean uses an AS400FieldModel, which uses an EditcodeEditwordFormatter, ComparisonRangeValidator, and NumericCharacterDocument; the data type is character, data length is 10, and number of decimal places is 0. JFormattedTable then creates the JFormattedTableColumns from the table model if the TableColumnModel is null. The FieldModel of JFormattedTableColumn is the FieldModel of JFormattedTable.
Note: If a JFormattedTable bean is contained in a JScrollPane and the auto resize mode of the table is set to AUTO_RESIZE_OFF, selecting the last row of the JFormattedTable may cause that row to scroll outside of view. To see it, scroll back with the vertical scroll bar until you can see the row.
For additional information about Swing architecture, see the following Web site:
http://java.sun.com/products/jfc/tsc/articles/architecture/index.html
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.