| Package | Description | 
|---|---|
| javax.swing | Provides a set of "lightweight"
(all-Java language) components that,
to the maximum degree possible, work the same on all platforms. | 
| javax.swing.event | Provides for events fired by Swing components. | 
| javax.swing.table | Provides classes and interfaces for dealing with
 javax.swing.JTable. | 
| Modifier and Type | Field and Description | 
|---|---|
| protected TableModel | JTable. dataModelThe  TableModelof the table. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected TableModel | JTable. createDefaultDataModel()Returns the default table model object, which is
 a  DefaultTableModel. | 
| TableModel | JTable. getModel()Returns the  TableModelthat provides the data displayed by thisJTable. | 
| Modifier and Type | Method and Description | 
|---|---|
| RowSorter<? extends TableModel> | JTable. getRowSorter()Returns the object responsible for sorting. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | JTable. setModel(TableModel dataModel)Sets the data model for this table to  newModeland registers
 with it for listener notifications from the new data model. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | JTable. setRowSorter(RowSorter<? extends TableModel> sorter)Sets the  RowSorter. | 
| Constructor and Description | 
|---|
| JTable(TableModel dm)Constructs a  JTablethat is initialized withdmas the data model, a default column model,
 and a default selection model. | 
| JTable(TableModel dm,
      TableColumnModel cm)Constructs a  JTablethat is initialized withdmas the data model,cmas the column model, and a default selection model. | 
| JTable(TableModel dm,
      TableColumnModel cm,
      ListSelectionModel sm)Constructs a  JTablethat is initialized withdmas the data model,cmas the
 column model, andsmas the selection model. | 
| Constructor and Description | 
|---|
| TableModelEvent(TableModel source)All row data in the table has changed, listeners should discard any state
  that was based on the rows and requery the  TableModelto get the new row count and all the appropriate values. | 
| TableModelEvent(TableModel source,
               int row)This row of data has been updated. | 
| TableModelEvent(TableModel source,
               int firstRow,
               int lastRow)The data in rows [firstRow, lastRow] have been updated. | 
| TableModelEvent(TableModel source,
               int firstRow,
               int lastRow,
               int column)The cells in column column in the range
  [firstRow, lastRow] have been updated. | 
| TableModelEvent(TableModel source,
               int firstRow,
               int lastRow,
               int column,
               int type)The cells from (firstRow, column) to (lastRow, column) have been changed. | 
| Modifier and Type | Class and Description | 
|---|---|
| class  | TableRowSorter<M extends TableModel>An implementation of  RowSorterthat provides sorting
 and filtering using aTableModel. | 
| Modifier and Type | Class and Description | 
|---|---|
| class  | AbstractTableModelThis abstract class provides default implementations for most of
  the methods in the  TableModelinterface. | 
| class  | DefaultTableModelThis is an implementation of  TableModelthat
 uses aVectorofVectorsto store the
 cell value objects. | 
| Modifier and Type | Method and Description | 
|---|---|
| abstract String | TableStringConverter. toString(TableModel model,
        int row,
        int column)Returns the string representation of the value at the specified
 location. | 
 Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2015, Oracle and/or its affiliates.  All rights reserved.