| 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.table | Provides classes and interfaces for dealing with
 javax.swing.JTable. | 
| Modifier and Type | Method and Description | 
|---|---|
| TableColumn | JTable. getColumn(Object identifier)Returns the  TableColumnobject for the column in the table
 whose identifier is equal toidentifier, when compared usingequals. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | JTable. addColumn(TableColumn aColumn)Appends  aColumnto the end of the array of columns held by
  thisJTable's column model. | 
| void | JTable. removeColumn(TableColumn aColumn)Removes  aColumnfrom thisJTable's
  array of columns. | 
| Modifier and Type | Field and Description | 
|---|---|
| protected TableColumn | JTableHeader. draggedColumnThe index of the column being dragged. | 
| protected TableColumn | JTableHeader. resizingColumnThe index of the column being resized. | 
| Modifier and Type | Field and Description | 
|---|---|
| protected Vector<TableColumn> | DefaultTableColumnModel. tableColumnsArray of TableColumn objects in this model | 
| Modifier and Type | Method and Description | 
|---|---|
| TableColumn | DefaultTableColumnModel. getColumn(int columnIndex)Returns the  TableColumnobject for the column
 atcolumnIndex. | 
| TableColumn | TableColumnModel. getColumn(int columnIndex)Returns the  TableColumnobject for the column atcolumnIndex. | 
| TableColumn | JTableHeader. getDraggedColumn()Returns the the dragged column, if and only if, a drag is in
 process, otherwise returns  null. | 
| TableColumn | JTableHeader. getResizingColumn()Returns the resizing column. | 
| Modifier and Type | Method and Description | 
|---|---|
| Enumeration<TableColumn> | DefaultTableColumnModel. getColumns()Returns an  Enumerationof all the columns in the model. | 
| Enumeration<TableColumn> | TableColumnModel. getColumns()Returns an  Enumerationof all the columns in the model. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | DefaultTableColumnModel. addColumn(TableColumn aColumn)Appends  aColumnto the end of thetableColumnsarray. | 
| void | TableColumnModel. addColumn(TableColumn aColumn)Appends  aColumnto the end of thetableColumnsarray. | 
| void | DefaultTableColumnModel. removeColumn(TableColumn column)Deletes the  columnfrom thetableColumnsarray. | 
| void | TableColumnModel. removeColumn(TableColumn column)Deletes the  TableColumncolumnfrom thetableColumnsarray. | 
| void | JTableHeader. setDraggedColumn(TableColumn aColumn)Sets the header's  draggedColumntoaColumn. | 
| void | JTableHeader. setResizingColumn(TableColumn aColumn)Sets the header's  resizingColumntoaColumn. | 
 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, 2025, Oracle and/or its affiliates.  All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.