Generated by
JDiff

javax.swing.table Documentation Differences

This file contains all the changes in documentation in the package javax.swing.table as colored differences. Deletions are shown like this, and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a <code> tag will cause all subsequent paragraphs to be displayed differently.

Class AbstractTableModel

This abstract class provides default implementations for most of the methods in the TableModel interface. It takes care of the management of listnerslisteners and provides some conveniences for generating TableModelEvents and dispatching them to the listeners. To create a concrete TableModel as a sublcass of AbstractTableModel you need only provide implementations for the following three methods:
 public int getRowCount(); public int getColumnCount(); public Object getValueAt(int row int column); 

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence. @version 1.23 0828 02/2802/9800 @author Alan Chung @author Philip Milne

Class AbstractTableModel, void addTableModelListener(TableModelListener)

AddAdds a listener to the list that's notified each time a change to the data model occurs. @param l the TableModelListener
Class AbstractTableModel, int findColumn(String)

ConvenienceReturns method fora locating columns bycolumn given its name. Implementation is naive so this should be overridden if this method is to be called often. This method is not in the TableModel interface and is not used by the JTable. @param columnName string containing name of column to be located @return the column with columnName or -1 if not found
Class AbstractTableModel, void fireTableCellUpdated(int, int)

NotifyNotifies all listeners that the value of the cell at ([row column)] has been updated. @param row row of cell which has been updated @param column column of cell which has been updated @see TableModelEvent @see EventListenerList
Class AbstractTableModel, void fireTableChanged(TableModelEvent)

ForwardForwards the given notification event to all TableModelListeners that registered themselves as listeners for this table model. @param e the event to be forwarded @see #addTableModelListener @see TableModelEvent @see EventListenerList
Class AbstractTableModel, void fireTableDataChanged()

NotifyNotifies all listeners that all cell values in the table's rows may have changed. The number of rows may also have changed and the JTable should redraw the table from scratch. The structure of the table ie.(as in the order of the columns) is assumed to be the same. @see TableModelEvent @see EventListenerList
Class AbstractTableModel, void fireTableRowsDeleted(int, int)

NotifyNotifies all listeners that rows in the (inclusive) range [firstRow lastRow] inclusive have been deleted. @param firstRow the first row @param lastRow the last row @see TableModelEvent @see EventListenerList
Class AbstractTableModel, void fireTableRowsInserted(int, int)

NotifyNotifies all listeners that rows in the (inclusive) range [firstRow lastRow] inclusive have been inserted. @param firstRow the first row @param lastRow the last row @see TableModelEvent @see EventListenerList
Class AbstractTableModel, void fireTableRowsUpdated(int, int)

NotifyNotifies all listeners that rows in the (inclusive) range [firstRow lastRow] inclusive have been updated. @param firstRow the first row @param lastRow the last row @see TableModelEvent @see EventListenerList
Class AbstractTableModel, void fireTableStructureChanged()

NotifyNotifies all listeners that the table's structure has changed. The number of columns in the table and the names and types of the new columns may be different from the previous state. If the JTable recievesreceives this event and its autoCreateColumnsFromModel flag is set it discards any TableColumnstable columns that it had and reallocates default onescolumns in the order they appear in the model. This is the same as calling setModel(TableModel) on the JTable. @see TableModelEvent @see EventListenerList
Class AbstractTableModel, Class getColumnClass(int)

Returns Object.class byregardless defaultof columnIndex. @param columnIndex the column being queried @return the Object.class
Class AbstractTableModel, String getColumnName(int)

ReturnReturns a default name for the column using spreadsheet conventions: A B C ... Z AA AB etc. If column cannot be found returns an empty string. @param column the column being queried @return a string containing the default name of column
Class AbstractTableModel, boolean isCellEditable(int, int)

Returns false. This default implementation returns falseis the default implementation for all cells. @param rowIndex the row being queried @param columnIndex the column being queried @return false
Class AbstractTableModel, void removeTableModelListener(TableModelListener)

RemoveRemoves a listener from the list that's notified each time a change to the data model occurs. @param l the TableModelListener
Class AbstractTableModel, void setValueAt(Object, int, int)

This empty implementation is provided so users don't have to implement this method if their data model is not editable. @param aValue value to assign to cell @param rowIndex row of cell @param columnIndex column of cell

Class DefaultTableCellRenderer

The standard class for rendering (displaying) individual cells in a JTable.

Implementation Note: This class inherits from JLabel a standard component class. However JTable employs a unique mechanism for rendering its cells and therefore requires some slightly modified behavior from its cell renderer. The table class defines a single cell renderer and uses it as a as a rubber-stamp for rendering all cells in the table; it renders the first cell changes the contents of that cell renderer shifts the origin to the new location re-draws it and so on. The standard JLabel component was not designed to be used this way and we want to avoid triggering a revalidate each time the cell is drawn. This would greatly decrease performance because the revalidate message would be passed up the hierarchy of the container to determine whether any other components would be affected. So this class overrides the validate revalidate repaint and firePropertyChange methods to be no-ops. If you write your own renderer please keep this performance consideration in mind.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence. @version 1.15 0925 02/0102/9800 @author Philip Milne @see JTable


Class DefaultTableCellRenderer.UIResource

A subclass of DefaultTableCellRenderer that implements UIResource. DefaultTableCellRenderer doesn't implement UIResource directly so that applications can safely override the cellRenderer property with DefaultTableCellRenderer subclasses.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.


Class DefaultTableCellRenderer, void revalidate()

SupportOverridden for deferredperformance automatic layout. Calls invalidate() and then adds this components validateRoot to a list of components that need to be validated. Validation will occur after all currently pending events have been dispatched. In other words after this method is called the first validateRoot (if any) found when walking up the containment hierarchy of this component will be validated. By default JRootPane JScrollPane and JTextField return true from isValidateRoot(). This method will automatically be called on this component when a property value changes such that size location or internal layout of this component has been affectedreasons. ThisSee automatic updating differs from the AWT because programs generally no longer need to invoke validate() to get the contents of the GUI to update. Implementation @seeNote java.awt.Component#invalidatefor @seemore java.awtinformation.Container#validate @see #isValidateRoot @see RepaintManager#addInvalidComponent
Class DefaultTableCellRenderer, void setBackground(Color)

Overrides JComponent.setForeground to specifyassign the unselected-background color usingto the specified color. @param c set the background color to this value
Class DefaultTableCellRenderer, void setForeground(Color)

Overrides JComponent.setForeground to specifyassign the unselected-foreground color usingto the specified color. @param c set the foreground color to this value
Class DefaultTableCellRenderer, void updateUI()

Notification from the UIManager that the look and feel [L&F] has changed. Replaces the current UI object with the latest version from the UIManager. @see JComponent#updateUI
Class DefaultTableCellRenderer, void validate()

Validates this containerOverridden for performance and all of its subcomponentsreasons. AWT uses validate to cause a container to laySee out its subcomponents again after the components it containsImplementation haveNote been addedfor more to or modifiedinformation. @see #validate @see Component#invalidate

Class DefaultTableColumnModel

The standard column-handler for a JTable.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence. @version 1.26 1035 02/2102/9800 @author Alan Chung @author Philip Milne @see JTable

Class DefaultTableColumnModel, void addColumn(TableColumn)

Appends aColumn to the end of the receiver's tableColumns array. This method also posts the columnAdded() event to its listeners. @param column The the TableColumn to be added @exception IllegalArgumentException if aColumn is null @see #removeColumn
Class DefaultTableColumnModel, TableColumn getColumn(int)

Returns the TableColumn object for the column at columnIndex. @return the TableColumn object forparam columnIndex the index of the column at columnIndexdesired @param columnIndexreturn the indexTableColumn ofobject for the column desiredat columnIndex
Class DefaultTableColumnModel, int getColumnCount()

Returns the number of columns in the receiver'stableColumns table columns array. @return the number of columns in the receiver's table columnstableColumns array @see #getColumns
Class DefaultTableColumnModel, int getColumnIndex(Object)

Returns the index of the first column in the receiver's columnstableColumns array whose identifier is equal to identifier when compared using equals(). @param identifier the identifier object @return the index of the first table column in the receiver's tableColumns array whose identifier is equal to identifier when compared using equals(). @param identifier the identifier object @exception IllegalArgumentException if identifier is null or if no TableColumn has this identifier @see #getColumn
Class DefaultTableColumnModel, int getColumnIndexAtX(int)

Returns the index of the column that lies on theat position xPositionx or -1 if it lies outside theno column covers this anypoint. of@param x the column'shorizontal bounds.location of interest @return the index of the column or -1 if no column is found
Class DefaultTableColumnModel, int getColumnMargin()

Returns the width margin for TableColumn. The default columnMargin is 1. @return the maximum width for the TableColumn. @see #setColumnMargin
Class DefaultTableColumnModel, Enumeration getColumns()

Returns an Enumeration of all the columns in the model. @return an Enumeration of the columns in the model
Class DefaultTableColumnModel, ListSelectionModel getSelectionModel()

Returns the ListSelectionModel that is used to maintain column selection state. @return the object that provides column selection state. Or null if row selection is not allowed. @see #setSelectionModel()
Class DefaultTableColumnModel, void moveColumn(int, int)

Moves the column and heading at columnIndex to newIndex. The old column at columnIndex will now be found at newIndex. The column that used to be at newIndex is shifted left or right to make room. This will not move any columns if columnIndex equals newIndex. This method also posts thea columnMoved() event to its listeners. @param columnIndex the index of column to be moved @param newIndex Newnew index to move the column @exception IllegalArgumentException if column or newIndex are not in the valid range
Class DefaultTableColumnModel, void removeColumn(TableColumn)

Deletes the TableColumn column from the receiver's table columnstableColumns array. This method will do nothing if column is not in the table's columns list. tile() is called to resize both the header and table views. This method also posts thea columnRemoved() event to its listeners. @param column The the TableColumn to be removed @see #addColumn
Class DefaultTableColumnModel, void setColumnMargin(int)

Sets the column margin to newMargin. This method also posts thea columnMarginChanged() event to its listeners. @param newMargin the widthnew margin ofwidth the columnin pixels @see #getColumnMargin @see #getTotalColumnWidth
Class DefaultTableColumnModel, void setSelectionModel(ListSelectionModel)

Sets the selection model for this TableColumnModel to newModel and registers with for listnerlistener notifications from the new selection model. If newModel is null it means columns are not selectablean exception is thrown. @param newModel the new selection model @exception IllegalArgumentException if newModel is null @see #getSelectionModel

Class DefaultTableModel

This is an implementation of TableModel that uses a Vector of Vectors to store the cell value objects.

Note: The DefaultTableModel's API contains the methods addColumn() removeColumn() but not methods to insert a column at an index nor methods to move the columns. This is because JTable does not display the columns based on the order of the columns in this model. So rearranging them here doesn't do much. See the column ordering methods in TableColumnModel. Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence. @version 1.19 0827 02/2802/9800 @author Alan Chung @author Philip Milne @see TableModel @see #getDataVector

Class DefaultTableModel, constructor DefaultTableModel()

Constructs a default DefaultTableModel which is a table of zero columns and zero rows.
Class DefaultTableModel, constructor DefaultTableModel(Object[], int)

Constructs a DefaultTableModel with as many columns as there are elements in columnNames and numRows of null object values. Each column's name will be taken from the columnNames array. @param columnNames Arrayarray containing the names of the new columns. If this is null then the model has no columns @param numRows Thethe number of rows the table holds @see #setDataVector @see #setValueAt
Class DefaultTableModel, constructor DefaultTableModel(Object[][], Object[])

Constructs a DefaultTableModel and initializes the table by passing data and columnNames to the setDataVector() method. The first index in the Object[][] array is the row index and the second is the column index. @param data Thethe data of the table @param columnNames Thethe names of the columns. @see #getDataVector @see #setDataVector
Class DefaultTableModel, constructor DefaultTableModel(Vector, Vector)

Constructs a DefaultTableModel and initializes the table by passing data and columnNames to the setDataVector() method. @param data Thethe data of the table @param columnNames Vectorvector containing the names of the new columns. @see #getDataVector @see #setDataVector
Class DefaultTableModel, constructor DefaultTableModel(Vector, int)

Constructs a DefaultTableModel with as many columns as there are elements in columnNames and numRows of null object values. Each column's name will be taken from the columnNames vector. @param columnNames Vectorvector containing the names of the new columns. If this is null then the model has no columns @param numRows Thethe number of rows the table holds @see #setDataVector @see #setValueAt
Class DefaultTableModel, constructor DefaultTableModel(int, int)

Constructs a DefaultTableModel with numRows and numColumns of null object values. @param numRows Thethe number of rows the table holds @param numColumns Thethe number of columns the table holds @see #setValueAt
Class DefaultTableModel, void addColumn(Object)

AddAdds a column to the model. The new column will have the idenitifieridentifier columnName. This method will send a tableChanged() notification message to all the listeners. This method is a cover for addColumn(Object Vector) which uses null as the data vector. @param columnName the identifier of the column being added @exception IllegalArgumentException if columnName is null
Class DefaultTableModel, void addColumn(Object, Object[])

Adds a column to the model. withThe new column namewill have the identifier columnName. columnData is the optional array of data for the column. If it is null the column is filled with null values. Otherwise the new data will be added to model starting with the first element going to row 0 etc. This method will send a tableChanged notification message to all the listeners. @see #addColumn(Object Vector)
Class DefaultTableModel, void addColumn(Object, Vector)

AddAdds a column to the model. The new column will have the idenitifieridentifier columnName. columnData is the optional Vectorvector of data for the column. If it is null the column is filled with null values. Otherwise the new data will be added to model starting with the first element going to row 0 etc. This method will send a tableChanged() notification message to all the listeners. @param columnName the identifier of the column being added @param columnData optional data of the column being added @exception IllegalArgumentException if columnName is null
Class DefaultTableModel, void addRow(Object[])

AddAdds a row to the end of the model. The new row will contain null values unless rowData is specified. Notification of the row being added will be generated. @param rowData optional data of the row being added
Class DefaultTableModel, void addRow(Vector)

AddAdds a row to the end of the model. The new row will contain null values unless rowData is specified. Notification of the row being added will be generated. @param rowData optional data of the row being added
Class DefaultTableModel, Vector convertToVector(Object[])

Returns a Vectorvector that contains the same objects as the array. @param anArray the array to be converted @return the new vector; if anArray is null returns null
Class DefaultTableModel, Vector convertToVector(Object[][])

Returns a Vectorvector of Vectorsvectors that contains the same objects as the array. @param anArray the double array to be converted @return the new vector of vectors; if anArray is null returns null
Class DefaultTableModel, String getColumnName(int)

Returns the column name. @return a name for this column using the string value of the appropriate member in columnIdentfierscolumnIdentifiers. If columnIdentfierscolumnIdentifiers is null or does not have andan entry for this index returnreturns the default name provided by the superclass.
Class DefaultTableModel, Vector getDataVector()

ThisReturns returns the Vector of Vectors that contains the table's data values. The vectors contained in the outer vector are each a single row of values. In other words to get to the cell at row 1 column 5:

((Vector)getDataVector().elementAt(1)).elementAt(5);

You can directly alter the returned Vector. You can change the cell values the number of rows. If you need to alter@return the numbervector of columns in the model you can do so with addColumn() removeColumn() or the setDataVector() methods. Once you have finished modifying the dataVector you must inform the modelvectors ofcontaining the newtables data using one of the notification methods. The notification methods will generate the appropriate TableModelListener messages to notify the JTable and any other listeners of this model.values @see #newDataAvailable @see #newRowsAdded @see #setDataVector

Class DefaultTableModel, Object getValueAt(int, int)

Returns an attribute value for the cell at row and column. @param row the row whose value is to be lookedqueried up @param column the column whose value is to be looked upqueried @return the value Object at the specified cell @exception ArrayIndexOutOfBoundsException if an invalid row or column was given.
Class DefaultTableModel, void insertRow(int, Object[])

InsertInserts a row at row in the model. The new row will contain null values unless rowData is specified. Notification of the row being added will be generated. @param row the row index of the row to be inserted @param rowData optional data of the row being added @exception ArrayIndexOutOfBoundsException if the row was invalid.
Class DefaultTableModel, void insertRow(int, Vector)

InsertInserts a row at row in the model. The new row will contain null values unless rowData is specified. Notification of the row being added will be generated. @param row the row index of the row to be inserted @param rowData optional data of the row being added @exception ArrayIndexOutOfBoundsException if the row was invalid.
Class DefaultTableModel, boolean isCellEditable(int, int)

Returns true ifregardless the cell at row and column is editable. Otherwise the setValueAt() on the cell will not change the value of that cellparameter values. @param row the row whose value is to be looked upqueried @param column the column whose value is to be lookedqueried up @return true if the cell is editable. @see #setValueAt
Class DefaultTableModel, void moveRow(int, int, int)

Moves one or more rows starting at startIndex to endIndex in the model to the toIndex. This method will send a tableChanged() notification message to all the listeners.

 Examples of moves:

1. moveRow(1 3 5);

a|B|C|D|e|f|g|h|i|j|k - before a|e|f|B|C|D|g|h|i|j|k - after

2. moveRow(6 7 1);

a|b|c|d|e|f|G|H|i|j|k - before a|G|H|b|c|d|e|f|i|j|k - after

@param startIndex the starting row index to be moved @param endIndex the ending row index to be moved @param toIndex the destination of the rows to be moved @exception ArrayIndexOutOfBoundsException if any of the indices are out of range. Or; or if endIndex is less than startIndex.
Class DefaultTableModel, void newDataAvailable(TableModelEvent)

Equivalent to fireTableChanged. @param event the change event
Class DefaultTableModel, void newRowsAdded(TableModelEvent)

This method will makeEnsures surethat the new rows have the correct number of columns. ItThis is does soaccomplished by using the setSize method in Vector which truncates Vectorsvectors which are too long and appends nullsnulls if they are too short. This method also sends out a tableChanged() notification message to all the listeners. @parameterparam event Thisthis TableModelEvent describes where the rows were added. If null it assumes all the rows were newly added. @see #getDataVector
Class DefaultTableModel, void removeRow(int)

RemoveRemoves the row at row from the model. Notification of the row being removed will be sent to all the listeners. @param row the row index of the row to be removed @exception ArrayIndexOutOfBoundsException if the row was invalid.
Class DefaultTableModel, void rowsRemoved(TableModelEvent)

Equivalent to fireTableChanged(). @param event the change event
Class DefaultTableModel, void setColumnIdentifiers(Object[])

Replaces the column identifiers in the model. If the number of newIdentifiersnewIdentifiers is greater than the current numColumnsnumber of columns new columns are added to the end of each row in the model. If the number of newIdentifiers is less than the current number of columns all the extra columns at the end of a row are discarded.

@param newIdentifiers Arrayarray of column identifiers. AIf null means settingset the model to zero columns @see #setNumRows

Class DefaultTableModel, void setColumnIdentifiers(Vector)

Replaces the column identifiers in the model. If the number of newIdentifiers is greater than the current number of columns new columns are added to the end of each row in the model. If the number of newIdentifiers is less than the current number of columns all the extra columns at the end of a row are discarded.

@param newIdentifiers Vectorvector of column identifiers. AIf null means settingset the model to zero columns @see #setNumRows

Class DefaultTableModel, void setDataVector(Object[][], Object[])

ThisReplaces replaces the value in the dataVector instance variable with the values in the array newData. The first index in the Object[][] array is the row index and the second is the column index. columnNames are the names of the new columns. @param newData the new data vector @param columnNames the names of the columns @see #setDataVector(Vector Vector)
Class DefaultTableModel, void setDataVector(Vector, Vector)

ThisReplaces replaces the current dataVector instance variable with the new Vector of rows newData. columnNames are the names of the new columns. The first name in columnNames is mapped to column 0 in newData. Each row in newData is adjusted to match the number of columns in columnNames either by truncating the Vector if it is too long or adding null values if it is too short.

@param newData Thethe new data vector @param columnNames Thethe names of the columns @see #newDataAvailable @see #getDataVector

Class DefaultTableModel, void setNumRows(int)

Sets theObsolete as number of rows in the modelJava 2 platform v1. If the new size is greater than the current size new rows are added to the end of the model If the new size is less than the current size all rows at index newSize and greater are discarded3. @param newSizePlease theuse newsetRowCount number of rows @see #setColumnIdentifiersinstead.
Class DefaultTableModel, void setValueAt(Object, int, int)

Sets the object value for the cell at column and row. aValue is the new value. This method will generate a tableChanged() notification. @param aValue the new value. This; this can be null. @param row the row whose value is to be changed @param column the column whose value is to be changed @exception ArrayIndexOutOfBoundsException if an invalid row or column was given.
Class DefaultTableModel, Vector columnIdentifiers

The Vector of column identifiers.
Class DefaultTableModel, Vector dataVector

The Vector of VectorVectors of Object values.

Class JTableHeader

This is the columnobject header part of a JTable. Iwhich allowmanages the user to change column widths and column ordering. Iheader shareof the same TableColumnModel with a JTable.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence. @version 1.36 1054 03/0815/9800 @author Alan Chung @author Philip Milne @see javax.swing.JTable


Class JTableHeader.AccessibleJTableHeader

TheThis class usedimplements toaccessibility support obtainfor the accessibleJTableHeader class. It role forprovides an thisimplementation of the Java Accessibility API appropriate to table header user-interface objectelements.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.


Class JTableHeader.AccessibleJTableHeader.AccessibleJTableHeaderEntry, AccessibleContext getAccessibleContext()

Get the AccessibleContext associated with this @returnobject. In the AccessibleContextimplementation of the Java Accessibility API for this class returns this object which serves as its own AccessibleContext. @return this JComponentobject

Class JTableHeader, constructor JTableHeader()

Constructs a JTableHeader with a default TableColumnModel. @see #createDefaultColumnModel()
Class JTableHeader, constructor JTableHeader(TableColumnModel)

Constructs a JTableHeader which is initialized with cm as the column model. If cm is null this method will initialize the table header with a default TableColumnModel. @param cm Thethe column model for the table @see #createDefaultColumnModel()
Class JTableHeader, int columnAtPoint(Point)

Returns the index of the column that point lies in or -1 if it lies outsideout the receiver'sof bounds. @return the index of the column that point lies in or -1 if it lies outsideout the receiver'sof bounds
Class JTableHeader, TableColumnModel createDefaultColumnModel()

Returns the default column model object which is a DefaultTableColumnModel. SubclassA subclass can override this method to return a different column model object @return the default column model object
Class JTableHeader, AccessibleContext getAccessibleContext()

GetGets the AccessibleContext associated with this JComponentJTableHeader. For JTableHeaders the AccessibleContext takes the form of an AccessibleJTableHeader. A new AccessibleJTableHeader instance is created if necessary. @return an AccessibleJTableHeader that serves as the AccessibleContext of this JComponentJTableHeader
Class JTableHeader, TableColumnModel getColumnModel()

Returns the TableColumnModel that contains all column inforamtioninformation of this table header. @return the objectcolumnModel that provides the column state of the tableproperty @see #setColumnModel()
Class JTableHeader, TableColumn getDraggedColumn()

Returns the the dragged column if and only if a drag is in process otherwise returns null. @return the the dragged column if and only if a drag is in process otherwise returns null. @see #getDraggedDistance
Class JTableHeader, int getDraggedDistance()

Returns the column's horizontal distance from its original position if and only if a drag is in process. Otherwise the the return value is meaningless. @return the column's horizontal distance from its original position if and only if a drag is in process otherwise the return value is meaningless @see #getDraggedColumn
Class JTableHeader, Rectangle getHeaderRect(int)

Returns the rectangle containing the header tile at columnIndexcolumn. When the column parameter is out of bounds this method uses the same conventions as the JTable method getCellRect. @return the rectangle containing the header tile at columnIndexcolumn @exception IllegalArgumentException If columnIndex is out ofsee rangeJTable#getCellRect
Class JTableHeader, boolean getReorderingAllowed()

Returns true if the receiver allowsuser the useris allowed to rearrange columns by dragging their headers false otherwise. The default is true. You can rearrange columns programmatically regardless of this setting. @return true if the receiver allows the user to rearrange columns by dragging their headers falsereorderingAllowed otherwiseproperty @see #setReorderingAllowed
Class JTableHeader, boolean getResizingAllowed()

Returns true if the receiver allowsuser the useris allowed to resize columns by dragging between their headers false otherwise. The default is true. You can resize columns programmatically regardless of this setting. @return true if the receiver allows the user to resize columns by dragging betweenresizingAllowed their headers false otherwise.property @see #setResizingAllowed
Class JTableHeader, TableColumn getResizingColumn()

Returns the resizing column. If no column is being resized this method returns null. @return the resizing column
Class JTableHeader, JTable getTable()

Returns the table associated with this header's. @return partnerthe table property
Class JTableHeader, String getToolTipText(MouseEvent)

OverridingAllows to allowthe renderer's tips to be used if it hasthere is text set. @param event the location of the event identifies the proper renderer and therefore the proper tip @return the tool tip for this component
Class JTableHeader, TableHeaderUI getUI()

Returns the look and feel (L&F) object that renders this component. @return the TableHeaderUI object that renders this component
Class JTableHeader, String getUIClassID()

Returns the suffix used to construct the name of the look and feel (L&F) class thatused to rendersrender this component. @return the string "TableHeaderUI" @return "TableHeaderUI" @see JComponent#getUIClassID @see UIDefaults#getUI
Class JTableHeader, boolean getUpdateTableInRealTime()

Returns trueObsolete as if the receiver updates the body of the table view in real time when a column isJava resized or dragged2 platform v1. User can set this flag to false to3. speed up theReal time repaints table'sin response to user resizecolumn dragging or drag actions. Theresizing default is trueare now unconditional. @return true if the table updates in real time @see #setUpdateTableInRealTime
Class JTableHeader, String paramString()

Returns a string representation of this JTableHeader. This method is intended to be used only for debugging purposes and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.

Overriding paramString() to provide information about the specific new aspects of the JFC components. @return a string representation of this JTableHeader.

Class JTableHeader, void resizeAndRepaint()

ProperlySizes sizes the receiver and its header view and marks it as needing display. Also resets cursor rectangles forEquivalent the header view and lineto scrollrevalidate amountsfollowed for theby JScrollPanerepaint.
Class JTableHeader, void setColumnModel(TableColumnModel)

Sets the column model for this table to newModel and registers with for listnerlistener notifications from the new column model. @param newModelcolumnModel the new data source for this table @exception IllegalArgumentException if newModel is null @see #getColumnModel() @beaninfo bound: true description: The object governing the way columns appear in the view.
Class JTableHeader, void setDraggedColumn(TableColumn)

Sets the header's draggedColumn to aColumn @param aColumn the new value for draggedColumn
Class JTableHeader, void setDraggedDistance(int)

Sets the header's draggedDistance to distance. @param distance the distance dragged
Class JTableHeader, void setReorderingAllowed(boolean)

Sets whether the user can drag column headers to reorder columns. @param flagreorderingAllowed true if the table view should allow reordering; otherwise false @see #getReorderingAllowed @beaninfo bound: true description: Whether the user can drag column headers to reorder columns.
Class JTableHeader, void setResizingAllowed(boolean)

Sets whether the user can resize columns by dragging between headers. @param flagresizingAllowed true if table view should allow resizing @see #getResizingAllowed @beaninfo bound: true description: Whether the user can resize columns by dragging between headers.
Class JTableHeader, void setResizingColumn(TableColumn)

Sets the header's resizingColumn to aColumn. @param aColumn the column being resized
Class JTableHeader, void setTable(JTable)

Sets the table associated with this header's. @param table the partnernew table to@beaninfo aTablebound: true description: The table associated with this header.
Class JTableHeader, void setUI(TableHeaderUI)

Sets the look and feel (L&F) object that renders this component. @param ui the TableHeaderUI L&F object @see UIDefaults#getUI
Class JTableHeader, void setUpdateTableInRealTime(boolean)

Sets whetherObsolete as the body of the table updates in real time when a column isJava resized or dragged2 platform v1. @param flag true if3. tableView should update the body of the table in real timeReal time repaints in response to column dragging or resizing are @seenow #getUpdateTableInRealTimeunconditional.
Class JTableHeader, void updateUI()

Notification from the UIManager that the look and feel (L&F) has changed. Replaces the current UI object with the latest version from the UIManager. @see JComponent#updateUI
Class JTableHeader, TableColumnModel columnModel

The TableColumnModel of the table header.
Class JTableHeader, TableColumn draggedColumn

The index of the column being dragged. 0null if not dragging.
Class JTableHeader, int draggedDistance

The distance from its original position the column has been dragged.
Class JTableHeader, boolean reorderingAllowed

ReorderingIf true reordering of columns are allowed by the user; the default is true.
Class JTableHeader, boolean resizingAllowed

ResizingIf true resizing of columns are allowed by the user; the default is true.
Class JTableHeader, TableColumn resizingColumn

The index of the column being resized. 0null if not resizing.
Class JTableHeader, boolean updateTableInRealTime

IfObsolete this flagas is true then theof Java 2 platform headerv1.3. will repaint the table as aReal time repaints in response to column isdragging dragged or resizedresizing are now unconditional.

Class TableCellEditor

This interface defines the methodsmethod any object that would like to be an editor of values for components such as ListBoxJListBox JComboBox JTree ComboBoxor TreeJTable or Table etcneeds to implement. @version 1.1013 0802/2602/9800 @author Alan Chung
Class TableCellEditor, Component getTableCellEditorComponent(JTable, Object, boolean, int, int)

Sets an initial value for the editor. This will cause the editor to stopEditing and lose any partially edited value if the editor is editing when this method is called.

Returns the component that should be added to the client's Component hierarchy. Once installed in the client's hierarchy this component will then be able to draw and receive user input. @param table the JTable that is asking the editor to edit; This parameter can be null. @param value the value of the cell to be edited.; Itit is up to the specific editor to interpret and draw the value. eg.For example if value is the Stringstring "true" it could be rendered as a string or it could be rendered as a check box that is checked. null is a valid value. @param isSelected true isif the cell is to be rendererrendered with selection highlighting @param row the row of the cell being edited @param column the column of the cell being edited @return the component for editing


Class TableCellRenderer

This interface defines the methodsmethod required by any object that would like to be a renderer for cellcells in a JTable. @version 1.11 0815 02/2602/9800 @author Alan Chung
Class TableCellRenderer, Component getTableCellRendererComponent(JTable, Object, boolean, boolean, int, int)

This method is sent toReturns the component used for drawing the renderercell. by the drawing tableThis method is used to configure the renderer appropriately before drawing. Return the Component used for drawing. @param table the JTable that is asking the renderer to draw. This; parameter can be null. @param value the value of the cell to be rendered. It is up to the specific renderer to interpret and draw the value. eg.For example if value is the Stringstring "true" it could be rendered as a string or it could be rendered as a check box that is checked. null is a valid value. @param isSelected true isif the cell is to be rendererrendered with the selection highlightinghighlighted; otherwise false @param hasFocus if true render cell appropriately. For example put a special border on the cell if the cell can be edited render in the color used to indicate editing @param row the row index of the cell being drawn. When drawing the header the rowIndexvalue of row is -1. @param column the column index of the cell being drawn

Class TableColumn

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.

It is also possible to specify renderers and editors on a per type basis rather than a per column basis - see the setDefaultRenderer(Class) method in the JTable class. This default mechanism is only used when the renderer (or editor) in the TableColumn is null.

The TableColumn stores the link between the columns in the JTable and the columns in the TableModel. This theThe modelIndex is the column in the TableModel which will be queried for the data values for the cells in this column. As the column moves around in the view this modelIndex does not change.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence. @version 1.34 1049 02/2102/9800 @author Alan Chung @author Philip Milne @see javax.swing.table.TableColumnModel @see javax.swing.table.DefaultTableColumnModel @see javax.swing.table.JTableHeader#getDefaultRenderer() @see JTable#getDefaultRenderer(Class) @see JTable#getDefaultEditor(Class) @see JTable#getCellRenderer(int int) @see JTable#getCellEditor(int int)

Class TableColumn, constructor TableColumn()

Cover method using a default model index of 0 default width of 75 a null renderer and a null editor. This methodsmethod is intended for serialization. @see #TableColumn(int int TableCellRenderer TableCellEditor)
Class TableColumn, constructor TableColumn(int)

Cover method using a default width of 75 a null renderer and a null editor. @see #TableColumn(int int TableCellRenderer TableCellEditor)
Class TableColumn, constructor TableColumn(int, int)

Cover method using a null renderer and a null editor. @see #TableColumn(int int TableCellRenderer TableCellEditor)
Class TableColumn, constructor TableColumn(int, int, TableCellRenderer, TableCellEditor)

Creates and initializes an instance of TableColumn with modelIndex. All TableColumn constructors delegate to this one. The modelIndex is the index of the column in the model which will supply the data for this column in the table. The modelIndex does not change as the columns are reordered in the view. The width parameter is used to set both the preferredWidth for this column and the intialinitial width. The renderer and editor are the objects used repsectivelyrespectively to render and edit values in this column. When these are null default values provided by the getDefaultRenderer(Class) and getDefaultEditor(Class) methods in the JTable class are used to provide defaults based on the type of the data in this column. This column-centric rendering strategy can be circumvented by overriding the getCellRenderer() methods in the JTable.

@param modelIndex the column in the model which provides the values for this column @see JTable#getDefaultRenderer(Class) @see JTable#getDefaultEditor(Class) @see JTable#getCellRenderer(int int) @see JTable#getCellEditor(int int)

Class TableColumn, void addPropertyChangeListener(PropertyChangeListener)

AddAdds a PropertyChangeListener to the listener list. The listener is registered for all properties.

A PropertyChangeEvent will get fired in response to an explicit call to setFont setBackground or SetForegroundsetForeground on the current component. Note that if the current component is inheriting its foreground background or font from its container then no event will be fired in response to a change in the inherited property. @param listener The PropertyChangeListenerthe listener to be added

Class TableColumn, void disableResizedPosting()

Turns offThis field listener-notificationswas would otherwise occur when a column isnot used in previous releases and there resizedare currently no plans to support it in the future. @deprecated as of Java 2 platform v1.3
Class TableColumn, void enableResizedPosting()

Turns onThis field listener-notificationswas so that listenersnot used in previous releases and there are oncecurrently no plans to support it in the future. again@deprecated informed when a column is resizedas of Java 2 platform v1.3
Class TableColumn, TableCellEditor getCellEditor()

Returns the TableCellEditor used by the JTable to drawedit values for this column. The cellEditor of the column not only controls the visual look for the column but is also used to interpret the value object supplied by the TableModel. When the cellEditor is null the JTable uses a default editor based on the class of the cells in that column. The default value for a cellEditor is null. @return the TableCellEditor used by the JTable to draw values for thiscellEditor columnproperty @see #setCellEditor @see JTable#setDefaultEditor
Class TableColumn, TableCellRenderer getCellRenderer()

Returns the TableCellRenderer used by the JTable to draw values for this column. The cellRenderer of the column not only controls the visual look for the column but is also used to interpret the value object supplied by the TableModel. When the cellRenderer is null the JTable uses a default renderer based on the class of the cells in that column. The default value for a cellRenderer is null. @return the TableCellRenderer used by the JTable to draw values for thiscellRenderer columnproperty @see #setCellRenderer @see JTable#setDefaultRenderer
Class TableColumn, TableCellRenderer getHeaderRenderer()

Returns the TableCellRenderer used to draw the header of the TableColumn. The defaultWhen headerthe rendererheaderRenderer is anull JCellRendererthe initializedJTableHeader with auses its JLabeldefaultRenderer. @returnThe thedefault TableCellRenderervalue used tofor a drawheaderRenderer is null. @return the headerheaderRenderer property @see #setHeaderRenderer @see #setHeaderValue @see javax.swing.table.JTableHeader#getDefaultRenderer()
Class TableColumn, Object getHeaderValue()

Returns the Object used as the value for the header renderer. @return the Object used as the value for the headerheaderValue rendererproperty @see #setHeaderValue
Class TableColumn, Object getIdentifier()

Returns the identifier object for this column. Note identifiers are not used by the JTable they are purely a convenience for external use. If the identifier is null getIdentifier() returns getHeaderValue() as a default. @return the idenitifer object for thisidentifier columnproperty @see #setIdentifier
Class TableColumn, int getMaxWidth()

Returns the maximum width for the TableColumn. The TableColumn's width can't be made larger than this either by the user or programmatically. The default maxWidth is Integer.MAX_VALUE. @return the maximum width for themaxWidth TableColumn.property @see #setMaxWidth
Class TableColumn, int getMinWidth()

Returns the minimum width for the TableColumn. The TableColumn's width can't be made less than this either by the user or programmatically. The default minWidth is 15. @return the minimum width for theminWidth TableColumnproperty @see #setMinWidth
Class TableColumn, int getModelIndex()

GetsReturns the model index for this column. @return the modelIndex property
Class TableColumn, int getPreferredWidth()

Returns the preferred width of the TableColumn. The default preferred width is 75. @return the width ofpreferredWidth the TableColumnproperty @see #setPreferredWidth
Class TableColumn, boolean getResizable()

Returns true if the user is allowed to resize the TableColumn's width false otherwise. You can change the width programmatically regardless of this setting. The default is true. @return true if the user is allowed to resize the TableColumn width falseisResizable otherwise.property @see #setResizable
Class TableColumn, int getWidth()

Returns the width of the TableColumn. The default width is 75. @return the width of the TableColumnproperty @see #setWidth
Class TableColumn, void removePropertyChangeListener(PropertyChangeListener)

RemoveRemoves a PropertyChangeListener from the listener list. ThisThe removesPropertyChangeListener a PropertyChangeListener thatto be removed was registered for all properties. @param listener Thethe PropertyChangeListenerlistener to be removed
Class TableColumn, void setCellEditor(TableCellEditor)

Sets the TableCellEditoreditor to used by JTable to drawwhen individual values fora cell in this column tois anEditoredited. @param anEditorcellEditor the new data cell editorcellEditor @see #getCellEditor @beaninfo bound: true description: The editor to use for cell values.
Class TableColumn, void setCellRenderer(TableCellRenderer)

Sets the TableCellRenderer used by JTable to draw individual values for this column to aRenderer. Posts a@param bound property change notificationcellRenderer the new cellRenderer with@see the#getCellRenderer name@beaninfo CELL_RENDERER_PROPERTY.bound: @paramtrue aRendererdescription: the new data cell rendererThe renderer to use for @seecell #getCellRenderervalues.
Class TableColumn, void setHeaderRenderer(TableCellRenderer)

Sets the TableCellRenderer used to draw the TableColumn's header to aRendererheaderRenderer. Posts a bound property change notification@param withheaderRenderer the namenew HEADER_RENDERER_PROPERTY.headerRenderer @exception IllegalArgumentException if aRenderer issee null.#getHeaderRenderer @parambeaninfo aRendererbound: thetrue newdescription: The header renderer @see #getHeaderRenderer.
Class TableColumn, void setHeaderValue(Object)

Sets the Object whose string representation will be used as the value for the headerRenderer. Posts aWhen the boundTableColumn property change notification withis created the default theheaderValue nameis HEADER_VALUE_PROPERTYnull. @param aValueheaderValue the new header valueheaderValue @see #getHeaderValue @beaninfo bound: true description: The text to be used by the header renderer.
Class TableColumn, void setIdentifier(Object)

Sets the TableColumn's identifier to anIdentifier.

Note: identifiers are not used by the JTable they are purely a convenience for the external tagging and location of columns. @param anIdentifieridentifier an identifier for this column @see #getIdentifier @beaninfo bound: true description: A unique identifier for this column.

Class TableColumn, void setMaxWidth(int)

Sets the TableColumn's maximum width to newMaxWidthmaxWidth; also adjustingadjusts the currentwidth and preferred width if it'sthey are greater than this value. @param newMaxWidthmaxWidth the new maximum width value @see #getMaxWidth @see #setPreferredWidth @see #setMinWidth @beaninfo bound: true description: The maximum width of the column.
Class TableColumn, void setMinWidth(int)

Sets the TableColumn's minimum width to newMinWidthminWidth; also adjustingadjusts the current width and preferred width if it'sthey are less than this value. @param newMinWidthminWidth the new minimum width value @see #getMinWidth @see #setPreferredWidth @see #setMaxWidth @beaninfo bound: true description: The minimum width of the column.
Class TableColumn, void setModelIndex(int)

Sets the model index for this column. The model index is the index of the column in the model that will be displayed by this TableColumn. As the TableColumn is moved around in the view the model index remains constant. @param modelIndex the new modelIndex @beaninfo bound: true description: The model index.
Class TableColumn, void setPreferredWidth(int)

Sets this column's preferred width to preferredWidth. If preferredWidth exceeds the minimum or maximum width it's is adjusted to the appropriate limiting value.

For details on how the widths of columns in the JTable (and JTableHeader) are calculated from the preferredWidth see the sizeColumnsToFit(int) method in the JTable. @param preferredWidth Thethe new preferred width. @see #getPreferredWidth @see JTable#sizeColumnsToFit(int) @beaninfo bound: true description: The preferred width of the column.

Class TableColumn, void setResizable(boolean)

Sets whether the userthis column can resize the receiver inbe its JTableViewresized. @param flagisResizable if true if theresizing is columnallowed; isResizableotherwise false @see #getResizable @beaninfo bound: true description: Whether or not this column can be resized.
Class TableColumn, void setWidth(int)

This method should not be used to set the widths of columns in the JTable - use setPreferredWidth() instead. Like a layout manager in the AWT the JTable adjusts a column's width automatically whenever the table itself changes size or a column's preferred width is changed. Setting widths programmatically therefore has no long term effect.

This methodsmethod sets this column's width to newWidthwidth. If newWidthwidth exceeds the minimum or maximum width it's is adjusted to the appropriate limiting value. Posts a bound property change notification with the name COLUMN_WIDTH_PROPERTY.

@param newWidth Thewidth the new width value @see #getWidth @see #setMinWidth @see #setMaxWidth @see #setPreferredWidth @see JTable#sizeColumnsToFit(int) @beaninfo bound: true description: The width of the column.

Class TableColumn, void sizeWidthToFit()

Resizes the TableColumn to fit the width of its header cell. IfThis the maximum width is less than the width of the header the maximum is increased to the header'smethod width.does Similarlynothing if the minimum width is greater than the width of the header the minimumrenderer is reduced tonull (the header'sdefault widthcase). @see #setPreferredWidth
Class TableColumn, String CELL_RENDERER_PROPERTY

Bound propertyObsolete as nameof Java 2 platform v1.3. Please use string literals to identify properties.
Class TableColumn, String COLUMN_WIDTH_PROPERTY

Bound propertyObsolete as nameof Java 2 platform v1.3. Please use string literals to identify properties.
Class TableColumn, String HEADER_RENDERER_PROPERTY

Bound propertyObsolete as nameof Java 2 platform v1.3. Please use string literals to identify properties.
Class TableColumn, String HEADER_VALUE_PROPERTY

Bound propertyObsolete as nameof Java 2 platform v1.3. Please use string literals to identify properties.
Class TableColumn, TableCellEditor cellEditor

The editor used to edit the data cells of the column.
Class TableColumn, TableCellRenderer cellRenderer

The renderer used to draw the data cells of the column.
Class TableColumn, TableCellRenderer headerRenderer

The renderer used to draw the header of the column.
Class TableColumn, Object headerValue

The header value of the column.
Class TableColumn, Object identifier

This object is not used internally by the drawing machinery of the JTable.; Identifiersidentifiers may be set in the TableColumn as as an optional way to tag and locate TableColumnstable columns. The table package does not modify or invoke any methods in these identifer objects other than the equals method which is used in the getColumnIndex() method in the DefaultTableColumnModel.
Class TableColumn, boolean isResizable

ResizableIf flagtrue the user is allowed to resize the column; the default is true.
Class TableColumn, int maxWidth

The maximum width of the column.
Class TableColumn, int minWidth

The minimum width of the column.
Class TableColumn, int modelIndex

The index of the column in the model which is to be displayed by this TableColumn. As columns are moved around in the view the model indexmodelIndex remains constant.
Class TableColumn, int resizedPostingDisableCount

CounterThis field was not used to disable postingin previous releases ofand there are currently no resizingplans notificationsto support untilit in the endfuture. @deprecated as of theJava 2 platform resizev1.3
Class TableColumn, int width

The width of the column.

Class TableColumnModel

Defines the requirements for a table column model object suitable for use with JTable. @version 1.16 0820 02/2602/9800 @author Alan Chung @author Philip Milne @see DefaultTableColumnModel
Class TableColumnModel, void addColumn(TableColumn)

Appends aColumn to the end of the receiver's tableColumns array. This method also posts thea columnAdded() event to its listeners. @param aColumn The the TableColumn to be added @see #removeColumn
Class TableColumnModel, void addColumnModelListener(TableColumnModelListener)

AddAdds a listener for table column model events. @param x a TableColumnModelListener object
Class TableColumnModel, TableColumn getColumn(int)

Returns the TableColumn object for the column at columnIndex. @return the TableColumn object forparam columnIndex the index of the column atdesired columnIndexcolumn @param columnIndexreturn the indexTableColumn ofobject for the column desiredat columnIndex
Class TableColumnModel, int getColumnCount()

Returns the number of columns in the model. @return the number of columns in the model
Class TableColumnModel, int getColumnIndex(Object)

Returns the index of the first column in the receiver's columns arraytable whose identifier is equal to identifier when compared using equals(). @param columnIdentifier the identifier object @return the index of the first table column in the receiver's tableColumns array whose identifier is equal to identifier when compared using equals(). @param identifier the identifier object @exception IllegalArgumentException if identifier is null or no TableColumn has this identifier @see #getColumn
Class TableColumnModel, int getColumnIndexAtX(int)

Returns the index of the column that lies on the horizontal point xPosition; or -1 if it lies outside the any of the column's bounds. @return the index of the column; or -1 if no column is found
Class TableColumnModel, int getColumnMargin()

Returns the width margin between the cells in each column. @return the margin in pixels between the cells
Class TableColumnModel, boolean getColumnSelectionAllowed()

Returns true if columns canmay be selected. @return true if columns canmay be selected @see #setColumnSelectionAllowed
Class TableColumnModel, Enumeration getColumns()

Returns an Enumeration of all the columns in the model. @return an Enumeration of all the columns in the model
Class TableColumnModel, int getSelectedColumnCount()

Returns the number of selected columns. @return the number of selected columns; or 0 if no columns are selected
Class TableColumnModel, int[] getSelectedColumns()

Returns an array of indexesindicies forof all selected columns. @return an array of ints givingintegers containing the indexesindicies of all selected columns; or an empty int array if no columnnothing is selected.
Class TableColumnModel, ListSelectionModel getSelectionModel()

Returns the current selection model. @return a ListSelectionModel object representing the selection model val @see #setSelectionModel
Class TableColumnModel, int getTotalColumnWidth()

Returns the total width of all the columns. @return the total computed width of all columns
Class TableColumnModel, void moveColumn(int, int)

Moves the column and headingits header at columnIndex to newIndex. The old column at columnIndex will now be found at newIndex. The column that used to be at newIndex is shifted left or right to make room. This will not move any columns if columnIndex equals newIndex. This method also posts thea columnMoved() event to its listeners. @param columnIndex the index of column to be moved @param newIndex New index to moveof the column's new location @exception IllegalArgumentException if columncolumnIndex or newIndex are not in the valid range
Class TableColumnModel, void removeColumn(TableColumn)

Deletes the TableColumn column from the receiver's table columnstableColumns array. This method will do nothing if column is not in the table's columnscolumn list. This method also posts thea columnRemoved() event to its listeners. @param column The the TableColumn to be removed @see #addColumn
Class TableColumnModel, void removeColumnModelListener(TableColumnModelListener)

RemoveRemoves a listener for table column model events. @param x a TableColumnModelListener object
Class TableColumnModel, void setColumnMargin(int)

Sets the TableColumn's column margin to newMargin. This method also posts thea columnMarginChanged() event to its listeners. @param newMargin the width marginin pixels of the new column margins @see #getColumnMargin
Class TableColumnModel, void setColumnSelectionAllowed(boolean)

Sets whether the columns in this model canmay be selected. @param flag true if columns may be selected; otherwise false @see #getColumnSelectionAllowed
Class TableColumnModel, void setSelectionModel(ListSelectionModel)

Sets the selection model which handles selections. @param newModel a ListSelectionModel object @see #getSelectionModel

Class TableModel

The TableModel interface ispecifiesspecifies the methods the JTable will use to interrogate a tabular data model.

The JTable can be set up to display any data model which implements the TableModel interface with a couple of lines of code:

 TableModel myData = new MyTableModel(); JTable table = new JTable(myData); 

For further documentation see Creating a Table Model in The Java Tutorial.

@version 1.15 0822 02/2602/9800 @author Philip Milne @author Alan Chung @see JTable @see AbstractTableModel

Class TableModel, void addTableModelListener(TableModelListener)

AddAdds a listener to the list that's is notified each time a change to the data model occurs. @param l the TableModelListener
Class TableModel, Class getColumnClass(int)

Returns the lowestmost commonspecific superclass for all denominatorthe cell Classvalues in the column. This is used by the tableJTable to set up a default renderer and editor for the column. @param columnIndex the index of the column @return the common ancestor class of the object values in the model.
Class TableModel, int getColumnCount()

Returns the number of columns managed byin the data source objectmodel. A JTable uses this method to determine how many columns it should create and display on initializationby default. @return the number orof columns in the model @see #getRowCount
Class TableModel, String getColumnName(int)

Returns the name of the column at columnIndex. This is used to initialize the table's column header name. Note: this name does not need to be unique. Two; two columns onin a table can have the same name. @param columnIndex the index of the column @return the name of the column
Class TableModel, int getRowCount()

Returns the number of records managedrows byin the data source objectmodel. A JTable uses this method to determine how many rows it should create and display. This method should be quick as it is call bycalled JTablefrequently quite frequentlyduring rendering. @return the number orof rows in the model @see #getColumnCount
Class TableModel, Object getValueAt(int, int)

Returns an attributethe value for the cell at columnIndex and rowIndex. @param rowIndex the row whose value is to be lookedqueried up @param columnIndex the column whose value is to be looked upqueried @return the value Object at the specified cell
Class TableModel, boolean isCellEditable(int, int)

Returns true if the cell at rowIndex and columnIndex is editable. Otherwise setValueAt() on the cell will not change the value of that cell. @param rowIndex the row whose value is to be lookedqueried up @param columnIndex the column whose value is to be looked upqueried @return true if the cell is editable. @see #setValueAt
Class TableModel, void removeTableModelListener(TableModelListener)

RemoveRemoves a listener from the list that's is notified each time a change to the data model occurs. @param l the TableModelListener
Class TableModel, void setValueAt(Object, int, int)

Sets an attribute value for the recordvalue in the cell at columnIndex and rowIndex. aValue is the newto valueaValue. @param aValue the new value @param rowIndex the row whose value is to be changed @param columnIndex the column whose value is to be changed @see #getValueAt @see #isCellEditable