Example usage for Java javax.swing.table DefaultTableModel fields, constructors, methods, implement or subclass
The text is from its open source code.
DefaultTableModel() Constructs a default DefaultTableModel which is a table of zero columns and zero rows. | |
DefaultTableModel(int rowCount, int columnCount) Constructs a DefaultTableModel with rowCount and columnCount of null object values. | |
DefaultTableModel(Vector> columnNames, int rowCount) Constructs a DefaultTableModel with as many columns as there are elements in columnNames and rowCount of null object values. | |
DefaultTableModel(Object[] columnNames, int rowCount) Constructs a DefaultTableModel with as many columns as there are elements in columnNames and rowCount of null object values. | |
DefaultTableModel(Vector extends Vector> data, Vector> columnNames) Constructs a DefaultTableModel and initializes the table by passing data and columnNames to the setDataVector method. | |
DefaultTableModel(Object[][] data, Object[] columnNames) Constructs a DefaultTableModel and initializes the table by passing data and columnNames to the setDataVector method. |
void | addColumn(Object columnName) Adds a column to the model. |
void | addColumn(Object columnName, Vector> columnData) Adds a column to the model. |
void | addColumn(Object columnName, Object[] columnData) Adds a column to the model. |
void | addRow(Vector> rowData) Adds a row to the end of the model. |
void | addRow(Object[] rowData) Adds a row to the end of the model. |
void | addTableModelListener(TableModelListener l) Adds a listener to the list that's notified each time a change to the data model occurs. |
int | findColumn(String columnName) Returns a column given its name. |
void | fireTableCellUpdated(int row, int column) Notifies all listeners that the value of the cell at [row, column] has been updated. |
void | fireTableDataChanged() Notifies all listeners that all cell values in the table's rows may have changed. |
void | fireTableRowsDeleted(int firstRow, int lastRow) Notifies all listeners that rows in the range [firstRow, lastRow] , inclusive, have been deleted. |
void | fireTableStructureChanged() Notifies all listeners that the table's structure has changed. |
Class> | getColumnClass(int columnIndex) Returns Object.class regardless of columnIndex . |
int | getColumnCount() Returns the number of columns in this data table. |
String | getColumnName(int column) Returns the column name. |
Vector | getDataVector() Returns the Vector of Vectors that contains the table's data values. |
int | getRowCount() Returns the number of rows in this data table. |
Object | getValueAt(int row, int column) Returns an attribute value for the cell at row and column . |
void | insertRow(int row, Vector> rowData) Inserts a row at row in the model. |
void | insertRow(int row, Object[] rowData) Inserts a row at row in the model. |
void | moveRow(int start, int end, int to) Moves one or more rows from the inclusive range start to end to the to position in the model. |
void | removeRow(int row) Removes the row at row from the model. |
void | setColumnCount(int columnCount) Sets the number of columns in the model. |
void | setColumnIdentifiers(Vector> columnIdentifiers) Replaces the column identifiers in the model. |
void | setColumnIdentifiers(Object[] newIdentifiers) Replaces the column identifiers in the model. |
void | setDataVector(Vector extends Vector> dataVector, Vector> columnIdentifiers) Replaces the current dataVector instance variable with the new Vector of rows, dataVector . |
void | setDataVector(Object[][] dataVector, Object[] columnIdentifiers) Replaces the value in the dataVector instance variable with the values in the array dataVector . |
void | setNumRows(int rowCount) Obsolete as of Java 2 platform v1.3. |
void | setRowCount(int rowCount) Sets the number of rows in the model. |
void | setValueAt(Object aValue, int row, int column) Sets the object value for the cell at column and row . |