javax.swing.table |
Provides classes and interfaces for dealing with
javax.swing.JTable .
JTable is Swing's grid or tabular view for
constructing user interfaces for tabular data structures inside
an application. Use this package if you want control over how tables
are constructed, updated, and rendered, as well as how data associated
with the tables are viewed and managed.
Note:
Most of the Swing API is not thread safe.
For details, see
Threads and Swing,
a section in
The Java Tutorial.
Related Documentation
For overviews, tutorials, examples, guides, and tool documentation, please see:
@since 1.2
@serial exclude
|
Java Source File Name | Type | Comment |
AbstractTableModel.java | Class | This abstract class provides default implementations for most of
the methods in the TableModel interface. |
DefaultTableCellRenderer.java | Class | The standard class for rendering (displaying) individual cells
in a JTable .
Implementation Note:
This class inherits from JLabel , a standard component class. |
DefaultTableColumnModel.java | Class | The standard column-handler for a JTable .
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. |
DefaultTableModel.java | Class | This is an implementation of TableModel that
uses a Vector of Vectors to store the
cell value objects.
Warning: DefaultTableModel returns a
column class of Object . |
JTableHeader.java | Class | This is the object which manages the header of the JTable .
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. |
TableCellEditor.java | Interface | This interface defines the method any object that would like to be
an editor of values for components such as JListBox ,
JComboBox , JTree , or JTable
needs to implement. |
TableCellRenderer.java | Interface | This interface defines the method required by any object that
would like to be a renderer for cells in a JTable . |
TableColumn.java | Class | A TableColumn represents all the attributes of a column in a
JTable , such as width, resizibility, minimum and maximum width.
In addition, the TableColumn provides slots for a renderer and
an editor that can be used to display and edit the values in this column. |
TableColumnModel.java | Interface | Defines the requirements for a table column model object suitable for
use with JTable . |
TableModel.java | Interface | The TableModel interface specifies the methods the
JTable will use to interrogate a tabular data model. |
TableRowSorter.java | Class | An implementation of RowSorter that provides sorting
and filtering using a TableModel .
The following example shows adding sorting to a JTable :
TableModel myModel = createMyTableModel();
JTable table = new JTable(myModel);
table.setRowSorter(new TableRowSorter(myModel));
This will do all the wiring such that when the user does the appropriate
gesture, such as clicking on the column header, the table will
visually sort.
JTable 's row-based methods and JTable 's
selection model refer to the view and not the underlying
model. |
TableStringConverter.java | Class | TableStringConverter is used to convert objects from the model into
strings. |