API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.swing. JTable View Source
Author(s)
Philip Milne
Shannon Hickey (printing support)
Since
Version
1.288 11/15/06
Serial
Hierarchy
 Object
      Component
          Container
              JComponent
                  JTable
Implements
 TableModelListener
 Scrollable
 TableColumnModelListener
 ListSelectionListener
 CellEditorListener
 Accessible
 RowSorterListener
Subclasses
Description
public class JTable
  The JTable is used to display and edit regular two-dimensional tables of cells.
Constructors
public JTable ()
  Constructs a default JTable that is initialized with a default data model, a default column model, and a default selection model.
public JTable (int numRows, int numColumns)
  Constructs a JTable with numRows and numColumns of empty cells using DefaultTableModel.
public JTable (Object rowData, Object columnNames)
  Constructs a JTable to display the values in the two dimensional array, rowData, with column names, columnNames.
public JTable (TableModel dm)
  Constructs a JTable that is initialized with dm as the data model, a default column model, and a default selection model.
public JTable (TableModel dm, TableColumnModel cm)
  Constructs a JTable that is initialized with dm as the data model, cm as the column model, and a default selection model.
public JTable (TableModel dm, TableColumnModel cm, ListSelectionModel sm)
  Constructs a JTable that is initialized with dm as the data model, cm as the column model, and sm as the selection model.
public JTable (Vector rowData, Vector columnNames)
  Constructs a JTable to display the values in the Vector of Vectors, rowData, with column names, columnNames.
Methods
Hide/Show inherited methods
pack-private void _paintImmediately (int x, int y, int w, int h) [Inherited From JComponent]
@Deprecated
public boolean action (Event evt, Object what) [Inherited From Component]
public Component add (Component comp) [Inherited From Container]
  Appends the specified component to the end of this container.
public Component add (Component comp, int index) [Inherited From Container]
  Adds the specified component to this container at the given position.
public void add (Component comp, Object constraints) [Inherited From Container]
  Adds the specified component to the end of this container.
public void add (Component comp, Object constraints, int index) [Inherited From Container]
  Adds the specified component to this container with the specified constraints at the specified index.
publicsynchronized void add (PopupMenu popup) [Inherited From Component]
  Adds the specified popup menu to the component.
public Component add (String name, Component comp) [Inherited From Container]
  Adds the specified component to this container.
public void addAncestorListener (AncestorListener listener) [Inherited From JComponent]
  Registers listener so that it will receive AncestorEvents when it or any of its ancestors move or are made visible or invisible.
public void addColumn (TableColumn aColumn)
  Appends aColumn to the end of the array of columns held by this JTable's column model.
public void addColumnSelectionInterval (int index0, int index1)
  Adds the columns from index0 to index1, inclusive, to the current selection.
publicsynchronized void addComponentListener (ComponentListener l) [Inherited From Component]
  Adds the specified component listener to receive component events from this component.
publicsynchronized void addContainerListener (ContainerListener l) [Inherited From Container]
  Adds the specified container listener to receive container events from this container.
publicsynchronized void addFocusListener (FocusListener l) [Inherited From Component]
  Adds the specified focus listener to receive focus events from this component when this component gains input focus.
public void addHierarchyBoundsListener (HierarchyBoundsListener l) [Inherited From Component]
  Adds the specified hierarchy bounds listener to receive hierarchy bounds events from this component when the hierarchy to which this container belongs changes.
public void addHierarchyListener (HierarchyListener l) [Inherited From Component]
  Adds the specified hierarchy listener to receive hierarchy changed events from this component when the hierarchy to which this container belongs changes.
protected void addImpl (Component comp, Object constraints, int index) [Inherited From Container]
  Adds the specified component to this container at the specified index.
publicsynchronized void addInputMethodListener (InputMethodListener l) [Inherited From Component]
  Adds the specified input method listener to receive input method events from this component.
publicsynchronized void addKeyListener (KeyListener l) [Inherited From Component]
  Adds the specified key listener to receive key events from this component.
publicsynchronized void addMouseListener (MouseListener l) [Inherited From Component]
  Adds the specified mouse listener to receive mouse events from this component.
publicsynchronized void addMouseMotionListener (MouseMotionListener l) [Inherited From Component]
  Adds the specified mouse motion listener to receive mouse motion events from this component.
publicsynchronized void addMouseWheelListener (MouseWheelListener l) [Inherited From Component]
  Adds the specified mouse wheel listener to receive mouse wheel events from this component.
public void addNotify () [Overrides JComponent]
  Calls the configureEnclosingScrollPane method.
public void addPropertyChangeListener (PropertyChangeListener listener) [Inherited From Container]
  Adds a PropertyChangeListener to the listener list.
public void addPropertyChangeListener (String propertyName, PropertyChangeListener listener) [Inherited From Container]
  Adds a PropertyChangeListener to the listener list for a specific property.
public void addRowSelectionInterval (int index0, int index1)
  Adds the rows from index0 to index1, inclusive, to the current selection.
publicsynchronized void addVetoableChangeListener (VetoableChangeListener listener) [Inherited From JComponent]
  Adds a VetoableChangeListener to the listener list.
pack-private boolean alwaysOnTop () [Inherited From JComponent]
  Returns whether this component should be guaranteed to be on top.
public void applyComponentOrientation (ComponentOrientation o) [Inherited From Container]
  Sets the ComponentOrientation property of this container and all components contained within it.
public boolean areFocusTraversalKeysSet (int id) [Inherited From Container]
  Returns whether the Set of focus traversal keys for the given focus traversal operation has been explicitly defined for this Container.
@Deprecated
public Rectangle bounds () [Inherited From Component]
public void changeSelection (int rowIndex, int columnIndex, boolean toggle, boolean extend)
  Updates the selection models of the table, depending on the state of the two flags: toggle and extend.
pack-private boolean checkIfChildObscuredBySibling () [Inherited From JComponent]
  Returns true, which implies that before checking if a child should be painted it is first check that the child is not obscured by another sibling.
public int checkImage (Image image, ImageObserver observer) [Inherited From Component]
  Returns the status of the construction of a screen representation of the specified image.
public int checkImage (Image image, int width, int height, ImageObserver observer) [Inherited From Component]
  Returns the status of the construction of a screen representation of the specified image.
public void clearSelection ()
Deselects all selected columns and rows.
pack-private void clientPropertyChanged (Object key, Object oldValue, Object newValue) [Inherited From JComponent]
protected AWTEvent coalesceEvents (AWTEvent existingEvent, AWTEvent newEvent) [Inherited From Component]
  Potentially coalesce an event being posted with an existing event.
public void columnAdded (TableColumnModelEvent e) [Specified in TableColumnModelListener]
  Invoked when a column is added to the table column model.
public int columnAtPoint (Point point)
  Returns the index of the column that point lies in, or -1 if the result is not in the range [0, getColumnCount()-1].
public void columnMarginChanged (ChangeEvent e) [Specified in TableColumnModelListener]
  Invoked when a column is moved due to a margin change.
public void columnMoved (TableColumnModelEvent e) [Specified in TableColumnModelListener]
  Invoked when a column is repositioned.
public void columnRemoved (TableColumnModelEvent e) [Specified in TableColumnModelListener]
  Invoked when a column is removed from the table column model.
public void columnSelectionChanged (ListSelectionEvent e) [Specified in TableColumnModelListener]
  Invoked when the selection model of the TableColumnModel is changed.
pack-private void componentInputMapChanged (ComponentInputMap inputMap) [Inherited From JComponent]
  Invoked from ComponentInputMap when its bindings change.
pack-privatefinalstatic void computeVisibleRect (Component c, Rectangle visibleRect) [Inherited From JComponent]
  Returns the Component's "visible rect rectangle" - the intersection of the visible rectangles for the component c and all of its ancestors.
public void computeVisibleRect (Rectangle visibleRect) [Inherited From JComponent]
  Returns the Component's "visible rect rectangle" - the intersection of the visible rectangles for this component and all of its ancestors.
pack-private void compWriteObjectNotify () [Overrides JComponent]
protected void configureEnclosingScrollPane ()
  If this JTable is the viewportView of an enclosing JScrollPane (the usual situation), configure this ScrollPane by, amongst other things, installing the table's tableHeader as the columnHeaderView of the scroll pane.
public boolean contains (int x, int y) [Inherited From JComponent]
  Gives the UI delegate an opportunity to define the precise shape of this component for the sake of mouse processing.
public boolean contains (Point p) [Inherited From Component]
  Checks whether this component "contains" the specified point, where the point's x and y coordinates are defined to be relative to the coordinate system of this component.
public int convertColumnIndexToModel (int viewColumnIndex)
  Maps the index of the column in the view at viewColumnIndex to the index of the column in the table model.
public int convertColumnIndexToView (int modelColumnIndex)
  Maps the index of the column in the table model at modelColumnIndex to the index of the column in the view.
public int convertRowIndexToModel (int viewRowIndex)
  Maps the index of the row in terms of the view to the underlying TableModel.
public int convertRowIndexToView (int modelRowIndex)
  Maps the index of the row in terms of the TableModel to the view.
@Deprecated
public int countComponents () [Inherited From Container]
protected TableColumnModel createDefaultColumnModel ()
  Returns the default column model object, which is a DefaultTableColumnModel.
public void createDefaultColumnsFromModel ()
  Creates default columns for the table from the data model using the getColumnCount method defined in the TableModel interface.
protected TableModel createDefaultDataModel ()
  Returns the default table model object, which is a DefaultTableModel.
protected void createDefaultEditors ()
  Creates default cell editors for objects, numbers, and boolean values.
protected void createDefaultRenderers ()
  Creates default cell renderers for objects, numbers, doubles, dates, booleans, and icons.
protected ListSelectionModel createDefaultSelectionModel ()
  Returns the default selection model object, which is a DefaultListSelectionModel.
protected JTableHeader createDefaultTableHeader ()
  Returns the default table header object, which is a JTableHeader.
public Image createImage (ImageProducer producer) [Inherited From Component]
  Creates an image from the specified image producer.
public Image createImage (int width, int height) [Inherited From Component]
  Creates an off-screen drawable image to be used for double buffering.
@Deprecated
publicstatic JScrollPane createScrollPaneForTable (JTable aTable)
Equivalent to new JScrollPane(aTable).
public JToolTip createToolTip () [Inherited From JComponent]
  Returns the instance of JToolTip that should be used to display the tooltip.
public VolatileImage createVolatileImage (int width, int height) [Inherited From Component]
  Creates a volatile off-screen drawable image to be used for double buffering.
public VolatileImage createVolatileImage (int width, int height, ImageCapabilities caps) throws AWTException [Inherited From Component]
  Creates a volatile off-screen drawable image, with the given capabilities.
@Deprecated
public void deliverEvent (Event e) [Inherited From Container]
@Deprecated
public void disable () [Inherited From JComponent]
protectedfinal void disableEvents (long eventsToDisable) [Inherited From Component]
  Disables the events defined by the specified event mask parameter from being delivered to this component.
publicfinal void dispatchEvent (AWTEvent e) [Inherited From Component]
  Dispatches an event to this component or one of its sub components.
pack-private void dndDone () [Inherited From JComponent]
  Called to indicate to this component that DnD is done.
public void doLayout () [Overrides Container]
  Causes this table to lay out its rows and columns.
pack-private DropLocation dropLocationForPoint (Point p) [Overrides JComponent]
  Calculates a drop location in this component, representing where a drop at the given point should insert data.
public boolean editCellAt (int row, int column)
  Programmatically starts editing the cell at row and column, if those indices are in the valid range, and the cell at those indices is editable.
public boolean editCellAt (int row, int column, EventObject e)
  Programmatically starts editing the cell at row and column, if those indices are in the valid range, and the cell at those indices is editable.
public void editingCanceled (ChangeEvent e) [Specified in CellEditorListener]
  Invoked when editing is canceled.
public void editingStopped (ChangeEvent e) [Specified in CellEditorListener]
  Invoked when editing is finished.
@Deprecated
public void enable () [Inherited From JComponent]
@Deprecated
public void enable (boolean b) [Inherited From Component]
protectedfinal void enableEvents (long eventsToEnable) [Inherited From Component]
  Enables the events defined by the specified event mask parameter to be delivered to this component.
public void enableInputMethods (boolean enable) [Inherited From Component]
  Enables or disables input method support for this component.
public Component findComponentAt (int x, int y) [Inherited From Container]
  Locates the visible child component that contains the specified position.
public Component findComponentAt (Point p) [Inherited From Container]
  Locates the visible child component that contains the specified point.
public void firePropertyChange (String propertyName, boolean oldValue, boolean newValue) [Inherited From JComponent]
  Support for reporting bound property changes for boolean properties.
public void firePropertyChange (String propertyName, byte oldValue, byte newValue) [Inherited From Component]
  Reports a bound property change.
public void firePropertyChange (String propertyName, char oldValue, char newValue) [Inherited From JComponent]
public void firePropertyChange (String propertyName, double oldValue, double newValue) [Inherited From Component]
  Reports a bound property change.
public void firePropertyChange (String propertyName, float oldValue, float newValue) [Inherited From Component]
  Reports a bound property change.
public void firePropertyChange (String propertyName, int oldValue, int newValue) [Inherited From JComponent]
  Support for reporting bound property changes for integer properties.
public void firePropertyChange (String propertyName, long oldValue, long newValue) [Inherited From Component]
  Reports a bound property change.
protected void firePropertyChange (String propertyName, Object oldValue, Object newValue) [Inherited From Component]
  Support for reporting bound property changes for Object properties.
public void firePropertyChange (String propertyName, short oldValue, short newValue) [Inherited From Component]
  Reports a bound property change.
protected void fireVetoableChange (String propertyName, Object oldValue, Object newValue) throws PropertyVetoException [Inherited From JComponent]
  Supports reporting constrained property changes.
public AccessibleContext getAccessibleContext () [Overrides JComponent] [Specified in Accessible]
  Gets the AccessibleContext associated with this JTable.
public ActionListener getActionForKeyStroke (KeyStroke aKeyStroke) [Inherited From JComponent]
  Returns the object that will perform the action registered for a given keystroke.
publicfinal ActionMap getActionMap () [Inherited From JComponent]
  Returns the ActionMap used to determine what Action to fire for particular KeyStroke binding.
pack-privatefinal ActionMap getActionMap (boolean create) [Inherited From JComponent]
  Finds and returns the appropriate ActionMap.
public float getAlignmentX () [Inherited From JComponent]
  Overrides Container.getAlignmentX to return the vertical alignment.
public float getAlignmentY () [Inherited From JComponent]
  Overrides Container.getAlignmentY to return the horizontal alignment.
public AncestorListener getAncestorListeners () [Inherited From JComponent]
  Returns an array of all the ancestor listeners registered on this component.
public boolean getAutoCreateColumnsFromModel ()
  Determines whether the table will create default columns from the model.
public boolean getAutoCreateRowSorter ()
  Returns true if whenever the model changes, a new RowSorter should be created and installed as the table's sorter; otherwise, returns false.
public int getAutoResizeMode ()
  Returns the auto resize mode of the table.
public boolean getAutoscrolls () [Inherited From JComponent]
  Gets the autoscrolls property.
public Color getBackground () [Inherited From Component]
  Gets the background color of this component.
public int getBaseline (int width, int height) [Inherited From JComponent]
  Returns the baseline.
public BaselineResizeBehavior getBaselineResizeBehavior () [Inherited From JComponent]
  Returns an enum indicating how the baseline of the component changes as the size changes.
public Border getBorder () [Inherited From JComponent]
  Returns the border of this component or null if no border is currently set.
public Rectangle getBounds () [Inherited From Component]
  Gets the bounds of this component in the form of a Rectangle object.
public Rectangle getBounds (Rectangle rv) [Inherited From JComponent]
  Stores the bounds of this component into "return value" rv and returns rv.
public TableCellEditor getCellEditor ()
  Returns the active cell editor, which is null if the table is not currently editing.
public TableCellEditor getCellEditor (int row, int column)
  Returns an appropriate editor for the cell specified by row and column.
public Rectangle getCellRect (int row, int column, boolean includeSpacing)
  Returns a rectangle for the cell that lies at the intersection of row and column.
public TableCellRenderer getCellRenderer (int row, int column)
  Returns an appropriate renderer for the cell specified by this row and column.
public boolean getCellSelectionEnabled ()
  Returns true if both row and column selection models are enabled.
publicfinal Object getClientProperty (Object key) [Inherited From JComponent]
  Returns the value of the property with the specified key.
public ColorModel getColorModel () [Inherited From Component]
  Gets the instance of ColorModel used to display the component on the output device.
public TableColumn getColumn (Object identifier)
  Returns the TableColumn object for the column in the table whose identifier is equal to identifier, when compared using equals.
public Class<Object> getColumnClass (int column)
  Returns the type of the column appearing in the view at column position column.
public int getColumnCount ()
  Returns the number of columns in the column model.
public TableColumnModel getColumnModel ()
  Returns the TableColumnModel that contains all column information of this table.
public String getColumnName (int column)
  Returns the name of the column appearing in the view at column position column.
public boolean getColumnSelectionAllowed ()
  Returns true if columns can be selected.
public Component getComponent (int n) [Inherited From Container]
  Gets the nth component in this container.
public Component getComponentAt (int x, int y) [Inherited From Container]
  Locates the component that contains the x,y position.
public Component getComponentAt (Point p) [Inherited From Container]
  Gets the component that contains the specified point.
public int getComponentCount () [Inherited From Container]
  Gets the number of components in this panel.
protected Graphics getComponentGraphics (Graphics g) [Inherited From JComponent]
  Returns the graphics object used to paint this component.
publicsynchronized ComponentListener getComponentListeners () [Inherited From Component]
  Returns an array of all the component listeners registered on this component.
public ComponentOrientation getComponentOrientation () [Inherited From Component]
  Retrieves the language-sensitive orientation that is to be used to order the elements or text within this component.
public JPopupMenu getComponentPopupMenu () [Inherited From JComponent]
  Returns JPopupMenu that assigned for this component.
public Component getComponents () [Inherited From Container]
  Gets all the components in this container.
public int getComponentZOrder (Component comp) [Inherited From Container]
  Returns the z-order index of the component inside the container.
public int getConditionForKeyStroke (KeyStroke aKeyStroke) [Inherited From JComponent]
  Returns the condition that determines whether a registered action occurs in response to the specified keystroke.
publicsynchronized ContainerListener getContainerListeners () [Inherited From Container]
  Returns an array of all the container listeners registered on this container.
pack-private boolean getCreatedDoubleBuffer () [Inherited From JComponent]
  Returns true if the RepaintManager created the double buffer image from the component.
public Cursor getCursor () [Inherited From Component]
  Gets the cursor set in the component.
public int getDebugGraphicsOptions () [Inherited From JComponent]
  Returns the state of graphics debugging.
public TableCellEditor getDefaultEditor (Class<Object> columnClass)
  Returns the editor to be used when no editor has been set in a TableColumn.
publicstatic Locale getDefaultLocale () [Inherited From JComponent]
  Returns the default locale used to initialize each JComponent's locale property upon creation.
public TableCellRenderer getDefaultRenderer (Class<Object> columnClass)
  Returns the cell renderer to be used when no renderer has been set in a TableColumn.
public boolean getDragEnabled ()
  Returns whether or not automatic drag handling is enabled.
publicfinal DropLocation getDropLocation ()
  Returns the location that this component should visually indicate as the drop location during a DnD operation over the component, or null if no location is to currently be shown.
publicfinal DropMode getDropMode ()
  Returns the drop mode for this component.
publicsynchronized DropTarget getDropTarget () [Inherited From Component]
Gets the DropTarget associated with this Component.
public int getEditingColumn ()
  Returns the index of the column that contains the cell currently being edited.
public int getEditingRow ()
  Returns the index of the row that contains the cell currently being edited.
public Component getEditorComponent ()
  Returns the component that is handling the editing session.
public boolean getFillsViewportHeight ()
  Returns whether or not this table is always made large enough to fill the height of an enclosing viewport.
public Container getFocusCycleRootAncestor () [Inherited From Component]
  Returns the Container which is the focus cycle root of this Component's focus traversal cycle.
publicsynchronized FocusListener getFocusListeners () [Inherited From Component]
  Returns an array of all the focus listeners registered on this component.
public Set<AWTKeyStroke> getFocusTraversalKeys (int id) [Inherited From Container]
  Returns the Set of focus traversal keys for a given traversal operation for this Container.
public boolean getFocusTraversalKeysEnabled () [Inherited From Component]
  Returns whether focus traversal keys are enabled for this Component.
public FocusTraversalPolicy getFocusTraversalPolicy () [Inherited From Container]
  Returns the focus traversal policy that will manage keyboard traversal of this Container's children, or null if this Container is not a focus cycle root.
public Font getFont () [Inherited From Component]
  Gets the font of this component.
public FontMetrics getFontMetrics (Font font) [Inherited From JComponent]
  Gets the FontMetrics for the specified Font.
public Color getForeground () [Inherited From Component]
  Gets the foreground color of this component.
public Graphics getGraphics () [Inherited From JComponent]
  Returns this component's graphics context, which lets you draw on a component.
public GraphicsConfiguration getGraphicsConfiguration () [Inherited From Component]
  Gets the GraphicsConfiguration associated with this Component.
pack-privatestatic void getGraphicsInvoked (Component root) [Inherited From JComponent]
public Color getGridColor ()
  Returns the color used to draw grid lines.
public int getHeight () [Inherited From JComponent]
  Returns the current height of this component.
publicsynchronized HierarchyBoundsListener getHierarchyBoundsListeners () [Inherited From Component]
  Returns an array of all the hierarchy bounds listeners registered on this component.
publicsynchronized HierarchyListener getHierarchyListeners () [Inherited From Component]
  Returns an array of all the hierarchy listeners registered on this component.
public boolean getIgnoreRepaint () [Inherited From Component]
 
public boolean getInheritsPopupMenu () [Inherited From JComponent]
  Returns true if the JPopupMenu should be inherited from the parent.
public InputContext getInputContext () [Inherited From Component]
  Gets the input context used by this component for handling the communication with input methods when text is entered in this component.
publicfinal InputMap getInputMap () [Inherited From JComponent]
  Returns the InputMap that is used when the component has focus.
publicfinal InputMap getInputMap (int condition) [Inherited From JComponent]
  Returns the InputMap that is used during condition.
pack-privatefinal InputMap getInputMap (int condition, boolean create) [Inherited From JComponent]
  Returns the InputMap to use for condition condition.
publicsynchronized InputMethodListener getInputMethodListeners () [Inherited From Component]
  Returns an array of all the input method listeners registered on this component.
public InputMethodRequests getInputMethodRequests () [Inherited From Component]
  Gets the input method request handler which supports requests from input methods for this component.
public InputVerifier getInputVerifier () [Inherited From JComponent]
  Returns the input verifier for this component.
public Insets getInsets () [Inherited From JComponent]
  If a border has been set on this component, returns the border's insets; otherwise calls super.getInsets.
public Insets getInsets (Insets insets) [Inherited From JComponent]
  Returns an Insets object containing this component's inset values.
public Dimension getIntercellSpacing ()
  Returns the horizontal and vertical space between cells.
publicsynchronized KeyListener getKeyListeners () [Inherited From Component]
  Returns an array of all the key listeners registered on this component.
public LayoutManager getLayout () [Inherited From Container]
  Gets the layout manager for this container.
public T getListeners (Class< T> listenerType) [Inherited From JComponent]
  Returns an array of all the objects currently registered as FooListeners upon this JComponent.
public Locale getLocale () [Inherited From Component]
  Gets the locale of this component.
public Point getLocation () [Inherited From Component]
  Gets the location of this component in the form of a point specifying the component's top-left corner.
public Point getLocation (Point rv) [Inherited From JComponent]
  Stores the x,y origin of this component into "return value" rv and returns rv.
public Point getLocationOnScreen () [Inherited From Component]
  Gets the location of this component in the form of a point specifying the component's top-left corner in the screen's coordinate space.
pack-privatestatic Set<KeyStroke> getManagingFocusBackwardTraversalKeys () [Inherited From JComponent]
Returns the Set of KeyStrokes to use if the component is managing focus for backward focus traversal.
pack-privatestatic Set<KeyStroke> getManagingFocusForwardTraversalKeys () [Inherited From JComponent]
Returns the Set of KeyStrokes to use if the component is managing focus for forward focus traversal.
public Dimension getMaximumSize () [Inherited From JComponent]
  If the maximum size has been set to a non-null value just returns it.
public Dimension getMinimumSize () [Inherited From JComponent]
  If the minimum size has been set to a non-null value just returns it.
public TableModel getModel ()
  Returns the TableModel that provides the data displayed by this JTable.
publicsynchronized MouseListener getMouseListeners () [Inherited From Component]
  Returns an array of all the mouse listeners registered on this component.
publicsynchronized MouseMotionListener getMouseMotionListeners () [Inherited From Component]
  Returns an array of all the mouse motion listeners registered on this component.
public Point getMousePosition () throws HeadlessException [Inherited From Component]
  Returns the position of the mouse pointer in this Component's coordinate space if the Component is directly under the mouse pointer, otherwise returns null.
public Point getMousePosition (boolean allowChildren) throws HeadlessException [Inherited From Container]
  Returns the position of the mouse pointer in this Container's coordinate space if the Container is under the mouse pointer, otherwise returns null.
publicsynchronized MouseWheelListener getMouseWheelListeners () [Inherited From Component]
  Returns an array of all the mouse wheel listeners registered on this component.
public String getName () [Inherited From Component]
  Gets the name of the component.
@Deprecated
public Component getNextFocusableComponent () [Inherited From JComponent]
  In release 1.4, the focus subsystem was rearchitected.
public Container getParent () [Inherited From Component]
  Gets the parent of this component.
@Deprecated
public ComponentPeer getPeer () [Inherited From Component]
public Point getPopupLocation (MouseEvent event) [Inherited From JComponent]
  Returns the preferred location to display the popup menu in this component's coordinate system.
public Dimension getPreferredScrollableViewportSize () [Specified in Scrollable]
  Returns the preferred size of the viewport for this table.
public Dimension getPreferredSize () [Inherited From JComponent]
  If the preferredSize has been set to a non-null value just returns it.
public Printable getPrintable (PrintMode printMode, MessageFormat headerFormat, MessageFormat footerFormat)
  Return a Printable for use in printing this JTable.
publicsynchronized PropertyChangeListener getPropertyChangeListeners () [Inherited From Component]
  Returns an array of all the property change listeners registered on this component.
publicsynchronized PropertyChangeListener getPropertyChangeListeners (String propertyName) [Inherited From Component]
  Returns an array of all the listeners which have been associated with the named property.
public KeyStroke getRegisteredKeyStrokes () [Inherited From JComponent]
  Returns the KeyStrokes that will initiate registered actions.
public JRootPane getRootPane () [Inherited From JComponent]
  Returns the JRootPane ancestor for this component.
public int getRowCount ()
  Returns the number of rows that can be shown in the JTable, given unlimited space.
public int getRowHeight ()
  Returns the height of a table row, in pixels.
public int getRowHeight (int row)
  Returns the height, in pixels, of the cells in row.
public int getRowMargin ()
  Gets the amount of empty space, in pixels, between cells.
public boolean getRowSelectionAllowed ()
  Returns true if rows can be selected.
public RowSorter<TableModel> getRowSorter ()
  Returns the object responsible for sorting.
public int getScrollableBlockIncrement (Rectangle visibleRect, int orientation, int direction) [Specified in Scrollable]
  Returns visibleRect.height or visibleRect.width, depending on this table's orientation.
public boolean getScrollableTracksViewportHeight () [Specified in Scrollable]
  Returns false to indicate that the height of the viewport does not determine the height of the table, unless getFillsViewportHeight is true and the preferred height of the table is smaller than the viewport's height.
public boolean getScrollableTracksViewportWidth () [Specified in Scrollable]
  Returns false if autoResizeMode is set to AUTO_RESIZE_OFF, which indicates that the width of the viewport does not determine the width of the table.
public int getScrollableUnitIncrement (Rectangle visibleRect, int orientation, int direction) [Specified in Scrollable]
  Returns the scroll increment (in pixels) that completely exposes one new row or column (depending on the orientation).
public int getSelectedColumn ()
  Returns the index of the first selected column, -1 if no column is selected.
public int getSelectedColumnCount ()
  Returns the number of selected columns.
public int getSelectedColumns ()
  Returns the indices of all selected columns.
public int getSelectedRow ()
  Returns the index of the first selected row, -1 if no row is selected.
public int getSelectedRowCount ()
  Returns the number of selected rows.
public int getSelectedRows ()
  Returns the indices of all selected rows.
public Color getSelectionBackground ()
  Returns the background color for selected cells.
public Color getSelectionForeground ()
  Returns the foreground color for selected cells.
public ListSelectionModel getSelectionModel ()
  Returns the ListSelectionModel that is used to maintain row selection state.
public boolean getShowHorizontalLines ()
  Returns true if the table draws horizontal lines between cells, false if it doesn't.
public boolean getShowVerticalLines ()
  Returns true if the table draws vertical lines between cells, false if it doesn't.
public Dimension getSize () [Inherited From Component]
  Returns the size of this component in the form of a Dimension object.
public Dimension getSize (Dimension rv) [Inherited From JComponent]
  Stores the width/height of this component into "return value" rv and returns rv.
public boolean getSurrendersFocusOnKeystroke ()
  Returns true if the editor should get the focus when keystrokes cause the editor to be activated
public JTableHeader getTableHeader ()
  Returns the tableHeader used by this JTable.
public Toolkit getToolkit () [Inherited From Component]
  Gets the toolkit of this component.
public Point getToolTipLocation (MouseEvent event) [Inherited From JComponent]
  Returns the tooltip location in this component's coordinate system.
public String getToolTipText () [Inherited From JComponent]
  Returns the tooltip string that has been set with setToolTipText.
public String getToolTipText (MouseEvent event) [Overrides JComponent]
  Overrides JComponent's getToolTipText method in order to allow the renderer's tips to be used if it has text set.
public Container getTopLevelAncestor () [Inherited From JComponent]
  Returns the top-level ancestor of this component (either the containing Window or Applet), or null if this component has not been added to any container.
public TransferHandler getTransferHandler () [Inherited From JComponent]
  Gets the transferHandler property.
publicfinal Object getTreeLock () [Inherited From Component]
  Gets this component's locking object (the object that owns the thread sychronization monitor) for AWT component-tree and layout operations.
public TableUI getUI ()
  Returns the L&F object that renders this component.
public String getUIClassID () [Overrides JComponent]
  Returns the suffix used to construct the name of the L&F class used to render this component.
public boolean getUpdateSelectionOnSort ()
  Returns true if the selection should be updated after sorting.
public Object getValueAt (int row, int column)
  Returns the cell value at row and column.
public boolean getVerifyInputWhenFocusTarget () [Inherited From JComponent]
  Returns the value that indicates whether the input verifier for the current focus owner will be called before this component requests focus.
publicsynchronized VetoableChangeListener getVetoableChangeListeners () [Inherited From JComponent]
  Returns an array of all the vetoable change listeners registered on this component.
public Rectangle getVisibleRect () [Inherited From JComponent]
  Returns the Component's "visible rectangle" - the intersection of this component's visible rectangle, new Rectangle(0, 0, getWidth(), getHeight()), and all of its ancestors' visible rectangles.
public int getWidth () [Inherited From JComponent]
  Returns the current width of this component.
pack-privatestatic byte getWriteObjCounter (JComponent comp) [Inherited From JComponent]
public int getX () [Inherited From JComponent]
  Returns the current x coordinate of the component's origin.
public int getY () [Inherited From JComponent]
  Returns the current y coordinate of the component's origin.
@Deprecated
public boolean gotFocus (Event evt, Object what) [Inherited From Component]
public void grabFocus () [Inherited From JComponent]
  Requests that this Component get the input focus, and that this Component's top-level ancestor become the focused Window.
@Deprecated
public boolean handleEvent (Event evt) [Inherited From Component]
public boolean hasFocus () [Inherited From Component]
  Returns true if this Component is the focus owner.
@Deprecated
public void hide () [Inherited From Component]
public boolean imageUpdate (Image img, int infoflags, int x, int y, int w, int h) [Inherited From Component]
  Repaints the component when the image has changed.
protected void initializeLocalVars ()
Initializes table properties to their default values.
@Deprecated
public Insets insets () [Inherited From Container]
@Deprecated
public boolean inside (int x, int y) [Inherited From Component]
public void invalidate () [Inherited From Container]
  Invalidates the container.
public boolean isAncestorOf (Component c) [Inherited From Container]
  Checks if the component is contained in the component hierarchy of this container.
public boolean isBackgroundSet () [Inherited From Component]
  Returns whether the background color has been explicitly set for this Component.
public boolean isCellEditable (int row, int column)
  Returns true if the cell at row and column is editable.
public boolean isCellSelected (int row, int column)
  Returns true if the specified indices are in the valid range of rows and columns and the cell at the specified position is selected.
public boolean isColumnSelected (int column)
  Returns true if the specified index is in the valid range of columns, and the column at that index is selected.
public boolean isCursorSet () [Inherited From Component]
  Returns whether the cursor has been explicitly set for this Component.
public boolean isDisplayable () [Inherited From Component]
  Determines whether this component is displayable.
public boolean isDoubleBuffered () [Inherited From JComponent]
  Returns whether this component should use a buffer to paint.
public boolean isEditing ()
  Returns true if a cell is being edited.
public boolean isEnabled () [Inherited From Component]
  Determines whether this component is enabled.
public boolean isFocusable () [Inherited From Component]
  Returns whether this Component can be focused.
public boolean isFocusCycleRoot () [Inherited From Container]
  Returns whether this Container is the root of a focus traversal cycle.
public boolean isFocusCycleRoot (Container container) [Inherited From Container]
  Returns whether the specified Container is the focus cycle root of this Container's focus traversal cycle.
public boolean isFocusOwner () [Inherited From Component]
  Returns true if this Component is the focus owner.
@Deprecated
public boolean isFocusTraversable () [Inherited From Component]
  Returns whether this Component can become the focus owner.
publicfinal boolean isFocusTraversalPolicyProvider () [Inherited From Container]
  Returns whether this container provides focus traversal policy.
public boolean isFocusTraversalPolicySet () [Inherited From Container]
  Returns whether the focus traversal policy has been explicitly set for this Container.
public boolean isFontSet () [Inherited From Component]
  Returns whether the font has been explicitly set for this Component.
public boolean isForegroundSet () [Inherited From Component]
  Returns whether the foreground color has been explicitly set for this Component.
public boolean isLightweight () [Inherited From Component]
  A lightweight component doesn't have a native toolkit peer.
publicstatic boolean isLightweightComponent (Component c) [Inherited From JComponent]
  Returns true if this component is lightweight, that is, if it doesn't have a native window system peer.
@Deprecated
public boolean isManagingFocus () [Inherited From JComponent]
  In release 1.4, the focus subsystem was rearchitected.
public boolean isMaximumSizeSet () [Inherited From Component]
  Returns true if the maximum size has been set to a non-null value otherwise returns false.
public boolean isMinimumSizeSet () [Inherited From Component]
  Returns whether or not setMinimumSize has been invoked with a non-null value.
public boolean isOpaque () [Inherited From JComponent]
  Returns true if this component is completely opaque.
public boolean isOptimizedDrawingEnabled () [Inherited From JComponent]
  Returns true if this component tiles its children -- that is, if it can guarantee that the children will not overlap.
pack-private boolean isPainting () [Inherited From JComponent]
Returns true if this component, or any of its ancestors, are in the processing of painting.
publicfinal boolean isPaintingForPrint () [Inherited From JComponent]
  Returns true if the current painting operation on this component is part of a print operation.
pack-private boolean isPaintingOrigin () [Inherited From JComponent]
  Returns true if a paint triggered on a child component should cause painting to originate from this Component, or one of its ancestors.
public boolean isPaintingTile () [Inherited From JComponent]
  Returns true if the component is currently painting a tile.
public boolean isPreferredSizeSet () [Inherited From Component]
  Returns true if the preferred size has been set to a non-null value otherwise returns false.
public boolean isRequestFocusEnabled () [Inherited From JComponent]
  Returns true if this JComponent should get focus; otherwise returns false.
public boolean isRowSelected (int row)
  Returns true if the specified index is in the valid range of rows, and the row at that index is selected.
public boolean isShowing () [Inherited From Component]
  Determines whether this component is showing on screen.
public boolean isValid () [Inherited From Component]
  Determines whether this component is valid.
public boolean isValidateRoot () [Inherited From JComponent]
  If this method returns true, revalidate calls by descendants of this component will cause the entire tree beginning with this root to be validated.
public boolean isVisible () [Inherited From Component]
  Determines whether this component should be visible when its parent is visible.
@Deprecated
public boolean keyDown (Event evt, int key) [Inherited From Component]
@Deprecated
public boolean keyUp (Event evt, int key) [Inherited From Component]
@Deprecated
public void layout () [Inherited From Container]
public void list () [Inherited From Component]
  Prints a listing of this component to the standard system output stream System.out.
public void list (PrintStream out) [Inherited From Component]
  Prints a listing of this component to the specified output stream.
public void list (PrintStream out, int indent) [Inherited From Container]
  Prints a listing of this container to the specified output stream.
public void list (PrintWriter out) [Inherited From Component]
  Prints a listing to the specified print writer.
public void list (PrintWriter out, int indent) [Inherited From Container]
  Prints out a list, starting at the specified indentation, to the specified print writer.
@Deprecated
public Component locate (int x, int y) [Inherited From Container]
@Deprecated
public Point location () [Inherited From Component]
@Deprecated
public boolean lostFocus (Event evt, Object what) [Inherited From Component]
@Deprecated
public Dimension minimumSize () [Inherited From Container]
@Deprecated
public boolean mouseDown (Event evt, int x, int y) [Inherited From Component]
@Deprecated
public boolean mouseDrag (Event evt, int x, int y) [Inherited From Component]
@Deprecated
public boolean mouseEnter (Event evt, int x, int y) [Inherited From Component]
@Deprecated
public boolean mouseExit (Event evt, int x, int y) [Inherited From Component]
@Deprecated
public boolean mouseMove (Event evt, int x, int y) [Inherited From Component]
@Deprecated
public boolean mouseUp (Event evt, int x, int y) [Inherited From Component]
@Deprecated
public void move (int x, int y) [Inherited From Component]
public void moveColumn (int column, int targetColumn)
  Moves the column column to the position currently occupied by the column targetColumn in the view.
@Deprecated
public void nextFocus () [Inherited From Component]
public void paint (Graphics g) [Inherited From JComponent]
  Invoked by Swing to draw components.
public void paintAll (Graphics g) [Inherited From Component]
  Paints this component and all of its subcomponents.
protected void paintBorder (Graphics g) [Inherited From JComponent]
  Paints the component's border.
protected void paintChildren (Graphics g) [Inherited From JComponent]
  Paints this component's children.
protected void paintComponent (Graphics g) [Inherited From JComponent]
  Calls the UI delegate's paint method, if the UI delegate is non-null.
public void paintComponents (Graphics g) [Inherited From Container]
  Paints each of the components in this container.
pack-private void paintForceDoubleBuffered (Graphics g) [Inherited From JComponent]
public void paintImmediately (int x, int y, int w, int h) [Inherited From JComponent]
  Paints the specified region in this component and all of its descendants that overlap the region, immediately.
public void paintImmediately (Rectangle r) [Inherited From JComponent]
  Paints the specified region now.
pack-private void paintToOffscreen (Graphics g, int x, int y, int w, int h, int maxX, int maxY) [Inherited From JComponent]
  Paints to the specified graphics.
protected String paramString () [Overrides JComponent]
  Returns a string representation of this table.
@Deprecated
public boolean postEvent (Event e) [Inherited From Component]
@Deprecated
public Dimension preferredSize () [Inherited From Container]
public Component prepareEditor (TableCellEditor editor, int row, int column)
  Prepares the editor by querying the data model for the value and selection state of the cell at row, column.
public boolean prepareImage (Image image, ImageObserver observer) [Inherited From Component]
  Prepares an image for rendering on this component.
public boolean prepareImage (Image image, int width, int height, ImageObserver observer) [Inherited From Component]
  Prepares an image for rendering on this component at the specified width and height.
public Component prepareRenderer (TableCellRenderer renderer, int row, int column)
  Prepares the renderer by querying the data model for the value and selection state of the cell at row, column.
public boolean print () throws PrinterException
  A convenience method that displays a printing dialog, and then prints this JTable in mode PrintMode.FIT_WIDTH, with no header or footer text.
public void print (Graphics g) [Inherited From JComponent]
  Invoke this method to print the component to the specified Graphics.
public boolean print (PrintMode printMode) throws PrinterException
  A convenience method that displays a printing dialog, and then prints this JTable in the given printing mode, with no header or footer text.
public boolean print (PrintMode printMode, MessageFormat headerFormat, MessageFormat footerFormat) throws PrinterException
  A convenience method that displays a printing dialog, and then prints this JTable in the given printing mode, with the specified header and footer text.
public boolean print (PrintMode printMode, MessageFormat headerFormat, MessageFormat footerFormat, boolean showPrintDialog, PrintRequestAttributeSet attr, boolean interactive) throws PrinterException HeadlessException
  Prints this table, as specified by the fully featured print method, with the default printer specified as the print service.
public boolean print (PrintMode printMode, MessageFormat headerFormat, MessageFormat footerFormat, boolean showPrintDialog, PrintRequestAttributeSet attr, boolean interactive, PrintService service) throws PrinterException HeadlessException
  Prints this JTable.
public void printAll (Graphics g) [Inherited From JComponent]
  Invoke this method to print the component.
protected void printBorder (Graphics g) [Inherited From JComponent]
  Prints the component's border.
protected void printChildren (Graphics g) [Inherited From JComponent]
  Prints this component's children.
protected void printComponent (Graphics g) [Inherited From JComponent]
  This is invoked during a printing operation.
public void printComponents (Graphics g) [Inherited From Container]
  Prints each of the components in this container.
protected void processComponentEvent (ComponentEvent e) [Inherited From Component]
  Processes component events occurring on this component by dispatching them to any registered ComponentListener objects.
protected void processComponentKeyEvent (KeyEvent e) [Inherited From JComponent]
  Processes any key events that the component itself recognizes.
protected void processContainerEvent (ContainerEvent e) [Inherited From Container]
  Processes container events occurring on this container by dispatching them to any registered ContainerListener objects.
protected void processEvent (AWTEvent e) [Inherited From Container]
  Processes events on this container.
protected void processFocusEvent (FocusEvent e) [Inherited From Component]
  Processes focus events occurring on this component by dispatching them to any registered FocusListener objects.
protected void processHierarchyBoundsEvent (HierarchyEvent e) [Inherited From Component]
  Processes hierarchy bounds events occurring on this component by dispatching them to any registered HierarchyBoundsListener objects.
protected void processHierarchyEvent (HierarchyEvent e) [Inherited From Component]
  Processes hierarchy events occurring on this component by dispatching them to any registered HierarchyListener objects.
protected void processInputMethodEvent (InputMethodEvent e) [Inherited From Component]
  Processes input method events occurring on this component by dispatching them to any registered InputMethodListener objects.
protected boolean processKeyBinding (KeyStroke ks, KeyEvent e, int condition, boolean pressed) [Overrides JComponent]
pack-private boolean processKeyBindings (KeyEvent e, boolean pressed) [Inherited From JComponent]
  This is invoked as the result of a KeyEvent that was not consumed by the FocusManager, KeyListeners, or the component.
pack-privatestatic boolean processKeyBindingsForAllComponents (KeyEvent e, Container container, boolean pressed) [Inherited From JComponent]
protected void processKeyEvent (KeyEvent e) [Inherited From JComponent]
Overrides processKeyEvent to process events.
protected void processMouseEvent (MouseEvent e) [Inherited From JComponent]
  Processes mouse events occurring on this component by dispatching them to any registered MouseListener objects, refer to Component.processMouseEvent(MouseEvent) for a complete description of this method.
protected void processMouseMotionEvent (MouseEvent e) [Inherited From JComponent]
  Processes mouse motion events, such as MouseEvent.MOUSE_DRAGGED.
protected void processMouseWheelEvent (MouseWheelEvent e) [Inherited From Component]
  Processes mouse wheel events occurring on this component by dispatching them to any registered MouseWheelListener objects.
publicfinal void putClientProperty (Object key, Object value) [Inherited From JComponent]
  Adds an arbitrary key/value "client property" to this component.
pack-private boolean rectangleIsObscured (int x, int y, int width, int height) [Inherited From JComponent]
  If the specified rectangle is completely obscured by any of this component's opaque children then returns true.
public void registerKeyboardAction (ActionListener anAction, KeyStroke aKeyStroke, int aCondition) [Inherited From JComponent]
This method is now obsolete, please use a combination of getActionMap() and getInputMap() for similiar behavior.
public void registerKeyboardAction (ActionListener anAction, String aCommand, KeyStroke aKeyStroke, int aCondition) [Inherited From JComponent]
  This method is now obsolete, please use a combination of getActionMap() and getInputMap() for similiar behavior.
public void remove (Component comp) [Inherited From Container]
  Removes the specified component from this container.
public void remove (int index) [Inherited From Container]
  Removes the component, specified by index, from this container.
publicsynchronized void remove (MenuComponent popup) [Inherited From Component]
  Removes the specified popup menu from the component.
public void removeAll () [Inherited From Container]
  Removes all the components from this container.
public void removeAncestorListener (AncestorListener listener) [Inherited From JComponent]
  Unregisters listener so that it will no longer receive AncestorEvents.
public void removeColumn (TableColumn aColumn)
  Removes aColumn from this JTable's array of columns.
public void removeColumnSelectionInterval (int index0, int index1)
  Deselects the columns from index0 to index1, inclusive.
publicsynchronized void removeComponentListener (ComponentListener l) [Inherited From Component]
  Removes the specified component listener so that it no longer receives component events from this component.
publicsynchronized void removeContainerListener (ContainerListener l) [Inherited From Container]
  Removes the specified container listener so it no longer receives container events from this container.
public void removeEditor ()
Discards the editor object and frees the real estate it used for cell rendering.
publicsynchronized void removeFocusListener (FocusListener l) [Inherited From Component]
  Removes the specified focus listener so that it no longer receives focus events from this component.
public void removeHierarchyBoundsListener (HierarchyBoundsListener l) [Inherited From Component]
  Removes the specified hierarchy bounds listener so that it no longer receives hierarchy bounds events from this component.
public void removeHierarchyListener (HierarchyListener l) [Inherited From Component]
  Removes the specified hierarchy listener so that it no longer receives hierarchy changed events from this component.
publicsynchronized void removeInputMethodListener (InputMethodListener l) [Inherited From Component]
  Removes the specified input method listener so that it no longer receives input method events from this component.
publicsynchronized void removeKeyListener (KeyListener l) [Inherited From Component]
  Removes the specified key listener so that it no longer receives key events from this component.
publicsynchronized void removeMouseListener (MouseListener l) [Inherited From Component]
  Removes the specified mouse listener so that it no longer receives mouse events from this component.
publicsynchronized void removeMouseMotionListener (MouseMotionListener l) [Inherited From Component]
  Removes the specified mouse motion listener so that it no longer receives mouse motion events from this component.
publicsynchronized void removeMouseWheelListener (MouseWheelListener l) [Inherited From Component]
  Removes the specified mouse wheel listener so that it no longer receives mouse wheel events from this component.
public void removeNotify () [Overrides JComponent]
  Calls the unconfigureEnclosingScrollPane method.
publicsynchronized void removePropertyChangeListener (PropertyChangeListener listener) [Inherited From Component]
  Removes a PropertyChangeListener from the listener list.
publicsynchronized void removePropertyChangeListener (String propertyName, PropertyChangeListener listener) [Inherited From Component]
  Removes a PropertyChangeListener from the listener list for a specific property.
public void removeRowSelectionInterval (int index0, int index1)
  Deselects the rows from index0 to index1, inclusive.
publicsynchronized void removeVetoableChangeListener (VetoableChangeListener listener) [Inherited From JComponent]
  Removes a VetoableChangeListener from the listener list.
public void repaint () [Inherited From Component]
  Repaints this component.
public void repaint (int x, int y, int width, int height) [Inherited From Component]
  Repaints the specified rectangle of this component.
public void repaint (long tm) [Inherited From Component]
  Repaints the component.
public void repaint (long tm, int x, int y, int width, int height) [Inherited From JComponent]
  Adds the specified region to the dirty region list if the component is showing.
public void repaint (Rectangle r) [Inherited From JComponent]
  Adds the specified region to the dirty region list if the component is showing.
@Deprecated
public boolean requestDefaultFocus () [Inherited From JComponent]
  In release 1.4, the focus subsystem was rearchitected.
public void requestFocus () [Inherited From JComponent]
  Requests that this Component gets the input focus.
public boolean requestFocus (boolean temporary) [Inherited From JComponent]
  Requests that this Component gets the input focus.
public boolean requestFocusInWindow () [Inherited From JComponent]
  Requests that this Component gets the input focus.
protected boolean requestFocusInWindow (boolean temporary) [Inherited From JComponent]
  Requests that this Component gets the input focus.
public void resetKeyboardActions () [Inherited From JComponent]
  Unregisters all the bindings in the first tier InputMaps and ActionMap.
@Deprecated
public void reshape (int x, int y, int w, int h) [Inherited From JComponent]
 
@Deprecated
public void resize (Dimension d) [Inherited From Component]
@Deprecated
public void resize (int width, int height) [Inherited From Component]
protected void resizeAndRepaint ()
Equivalent to revalidate followed by repaint.
public void revalidate () [Inherited From JComponent]
  Supports deferred automatic layout.
public int rowAtPoint (Point point)
  Returns the index of the row that point lies in, or -1 if the result is not in the range [0, getRowCount()-1].
pack-privatestatic Graphics safelyGetGraphics (Component c) [Inherited From JComponent]
pack-privatestatic Graphics safelyGetGraphics (Component c, Component root) [Inherited From JComponent]
public void scrollRectToVisible (Rectangle aRect) [Inherited From JComponent]
  Forwards the scrollRectToVisible() message to the JComponent's parent.
public void selectAll ()
Selects all rows, columns, and cells in the table.
publicfinal void setActionMap (ActionMap am) [Inherited From JComponent]
  Sets the ActionMap to am.
public void setAlignmentX (float alignmentX) [Inherited From JComponent]
  Sets the the vertical alignment.
public void setAlignmentY (float alignmentY) [Inherited From JComponent]
  Sets the the horizontal alignment.
public void setAutoCreateColumnsFromModel (boolean autoCreateColumnsFromModel)
  Sets this table's autoCreateColumnsFromModel flag.
public void setAutoCreateRowSorter (boolean autoCreateRowSorter)
  Specifies whether a RowSorter should be created for the table whenever its model changes.
public void setAutoResizeMode (int mode)
  Sets the table's auto resize mode when the table is resized.
public void setAutoscrolls (boolean autoscrolls) [Inherited From JComponent]
  Sets the autoscrolls property.
public void setBackground (Color bg) [Inherited From JComponent]
  Sets the background color of this component.
public void setBorder (Border border) [Inherited From JComponent]
  Sets the border of this component.
public void setBounds (int x, int y, int width, int height) [Inherited From Component]
  Moves and resizes this component.
public void setBounds (Rectangle r) [Inherited From Component]
  Moves and resizes this component to conform to the new bounding rectangle r.
public void setCellEditor (TableCellEditor anEditor)
  Sets the active cell editor.
public void setCellSelectionEnabled (boolean cellSelectionEnabled)
  Sets whether this table allows both a column selection and a row selection to exist simultaneously.
public void setColumnModel (TableColumnModel columnModel)
  Sets the column model for this table to newModel and registers for listener notifications from the new column model.
public void setColumnSelectionAllowed (boolean columnSelectionAllowed)
  Sets whether the columns in this model can be selected.
public void setColumnSelectionInterval (int index0, int index1)
  Selects the columns from index0 to index1, inclusive.
public void setComponentOrientation (ComponentOrientation o) [Inherited From Component]
  Sets the language-sensitive orientation that is to be used to order the elements or text within this component.
public void setComponentPopupMenu (JPopupMenu popup) [Inherited From JComponent]
  Sets the JPopupMenu for this JComponent.
public void setComponentZOrder (Component comp, int index) [Inherited From Container]
  Moves the specified component to the specified z-order index in the container.
pack-private void setCreatedDoubleBuffer (boolean newValue) [Inherited From JComponent]
  This is invoked by the RepaintManager if createImage is called on the component.
public void setCursor (Cursor cursor) [Inherited From Component]
  Sets the cursor image to the specified cursor.
public void setDebugGraphicsOptions (int debugOptions) [Inherited From JComponent]
  Enables or disables diagnostic information about every graphics operation performed within the component or one of its children.
public void setDefaultEditor (Class<Object> columnClass, TableCellEditor editor)
  Sets a default cell editor to be used if no editor has been set in a TableColumn.
publicstatic void setDefaultLocale (Locale l) [Inherited From JComponent]
  Sets the default locale used to initialize each JComponent's locale property upon creation.
public void setDefaultRenderer (Class<Object> columnClass, TableCellRenderer renderer)
  Sets a default cell renderer to be used if no renderer has been set in a TableColumn.
public void setDoubleBuffered (boolean aFlag) [Inherited From JComponent]
  Sets whether this component should use a buffer to paint.
public void setDragEnabled (boolean b)
  Turns on or off automatic drag handling.
pack-private Object setDropLocation (DropLocation location, Object state, boolean forDrop) [Overrides JComponent]
  Called to set or clear the drop location during a DnD operation.
publicfinal void setDropMode (DropMode dropMode)
  Sets the drop mode for this component.
publicsynchronized void setDropTarget (DropTarget dt) [Inherited From Component]
  Associate a DropTarget with this component.
public void setEditingColumn (int aColumn)
  Sets the editingColumn variable.
public void setEditingRow (int aRow)
  Sets the editingRow variable.
public void setEnabled (boolean enabled) [Inherited From JComponent]
  Sets whether or not this component is enabled.
public void setFillsViewportHeight (boolean fillsViewportHeight)
  Sets whether or not this table is always made large enough to fill the height of an enclosing viewport.
public void setFocusable (boolean focusable) [Inherited From Component]
  Sets the focusable state of this Component to the specified value.
public void setFocusCycleRoot (boolean focusCycleRoot) [Inherited From Container]
  Sets whether this Container is the root of a focus traversal cycle.
public void setFocusTraversalKeys (int id, Set<AWTKeyStroke> keystrokes) [Inherited From JComponent]
  Sets the focus traversal keys for a given traversal operation for this Component.
public void setFocusTraversalKeysEnabled (boolean focusTraversalKeysEnabled) [Inherited From Component]
  Sets whether focus traversal keys are enabled for this Component.
public void setFocusTraversalPolicy (FocusTraversalPolicy policy) [Inherited From Container]
  Sets the focus traversal policy that will manage keyboard traversal of this Container's children, if this Container is a focus cycle root.
publicfinal void setFocusTraversalPolicyProvider (boolean provider) [Inherited From Container]
  Sets whether this container will be used to provide focus traversal policy.
public void setFont (Font font) [Inherited From JComponent]
  Sets the font for this component.
public void setForeground (Color fg) [Inherited From JComponent]
  Sets the foreground color of this component.
public void setGridColor (Color gridColor)
  Sets the color used to draw grid lines to gridColor and redisplays.
public void setIgnoreRepaint (boolean ignoreRepaint) [Inherited From Component]
  Sets whether or not paint messages received from the operating system should be ignored.
public void setInheritsPopupMenu (boolean value) [Inherited From JComponent]
  Sets whether or not getComponentPopupMenu should delegate to the parent if this component does not have a JPopupMenu assigned to it.
publicfinal void setInputMap (int condition, InputMap map) [Inherited From JComponent]
  Sets the InputMap to use under the condition condition to map.
public void setInputVerifier (InputVerifier inputVerifier) [Inherited From JComponent]
  Sets the input verifier for this component.
public void setIntercellSpacing (Dimension intercellSpacing)
  Sets the rowMargin and the columnMargin -- the height and width of the space between cells -- to intercellSpacing.
public void setLayout (LayoutManager mgr) [Inherited From Container]
  Sets the layout manager for this container.
public void setLocale (Locale l) [Inherited From Component]
  Sets the locale of this component.
public void setLocation (int x, int y) [Inherited From Component]
  Moves this component to a new location.
public void setLocation (Point p) [Inherited From Component]
  Moves this component to a new location.
public void setMaximumSize (Dimension maximumSize) [Inherited From JComponent]
  Sets the maximum size of this component to a constant value.
public void setMinimumSize (Dimension minimumSize) [Inherited From JComponent]
  Sets the minimum size of this component to a constant value.
public void setModel (TableModel dataModel)
  Sets the data model for this table to newModel and registers with it for listener notifications from the new data model.
public void setName (String name) [Inherited From Component]
  Sets the name of the component to the specified string.
@Deprecated
public void setNextFocusableComponent (Component aComponent) [Inherited From JComponent]
  In release 1.4, the focus subsystem was rearchitected.
public void setOpaque (boolean isOpaque) [Inherited From JComponent]
  If true the component paints every pixel within its bounds.
pack-private void setPaintingChild (Component paintingChild) [Inherited From JComponent]
public void setPreferredScrollableViewportSize (Dimension size)
  Sets the preferred size of the viewport for this table.
public void setPreferredSize (Dimension preferredSize) [Inherited From JComponent]
  Sets the preferred size of this component.
public void setRequestFocusEnabled (boolean requestFocusEnabled) [Inherited From JComponent]
  Provides a hint as to whether or not this JComponent should get focus.
public void setRowHeight (int rowHeight)
  Sets the height, in pixels, of all cells to rowHeight, revalidates, and repaints.
public void setRowHeight (int row, int rowHeight)
  Sets the height for row to rowHeight, revalidates, and repaints.
public void setRowMargin (int rowMargin)
  Sets the amount of empty space between cells in adjacent rows.
public void setRowSelectionAllowed (boolean rowSelectionAllowed)
  Sets whether the rows in this model can be selected.
public void setRowSelectionInterval (int index0, int index1)
  Selects the rows from index0 to index1, inclusive.
public void setRowSorter (RowSorter<TableModel> sorter)
  Sets the RowSorter.
public void setSelectionBackground (Color selectionBackground)
  Sets the background color for selected cells.
public void setSelectionForeground (Color selectionForeground)
  Sets the foreground color for selected cells.
public void setSelectionMode (int selectionMode)
  Sets the table's selection mode to allow only single selections, a single contiguous interval, or multiple intervals.
public void setSelectionModel (ListSelectionModel newModel)
  Sets the row selection model for this table to newModel and registers for listener notifications from the new selection model.
public void setShowGrid (boolean showGrid)
  Sets whether the table draws grid lines around cells.
public void setShowHorizontalLines (boolean showHorizontalLines)
  Sets whether the table draws horizontal lines between cells.
public void setShowVerticalLines (boolean showVerticalLines)
  Sets whether the table draws vertical lines between cells.
public void setSize (Dimension d) [Inherited From Component]
  Resizes this component so that it has width d.width and height d.height.
public void setSize (int width, int height) [Inherited From Component]
  Resizes this component so that it has width width and height height.
public void setSurrendersFocusOnKeystroke (boolean surrendersFocusOnKeystroke)
  Sets whether editors in this JTable get the keyboard focus when an editor is activated as a result of the JTable forwarding keyboard events for a cell.
public void setTableHeader (JTableHeader tableHeader)
  Sets the tableHeader working with this JTable to newHeader.
public void setToolTipText (String text) [Inherited From JComponent]
  Registers the text to display in a tool tip.
public void setTransferHandler (TransferHandler newHandler) [Inherited From JComponent]
  Sets the transferHandler property, which is null if the component does not support data transfer operations.
protected void setUI (ComponentUI newUI) [Inherited From JComponent]
  Sets the look and feel delegate for this component.
public void setUI (TableUI ui)
  Sets the L&F object that renders this component and repaints.
pack-private void setUIProperty (String propertyName, Object value) [Overrides JComponent]
public void setUpdateSelectionOnSort (boolean update)
  Specifies whether the selection should be updated after sorting.
public void setValueAt (Object aValue, int row, int column)
  Sets the value for the cell in the table model at row and column.
public void setVerifyInputWhenFocusTarget (boolean verifyInputWhenFocusTarget) [Inherited From JComponent]
  Sets the value to indicate whether input verifier for the current focus owner will be called before this component requests focus.
public void setVisible (boolean aFlag) [Inherited From JComponent]
  Makes the component visible or invisible.
pack-privatestatic void setWriteObjCounter (JComponent comp, byte count) [Inherited From JComponent]
pack-private int shouldDebugGraphics () [Inherited From JComponent]
Returns true if debug information is enabled for this JComponent or one of its parents.
@Deprecated
public void show () [Inherited From Component]
@Deprecated
public void show (boolean b) [Inherited From Component]
@Deprecated
public Dimension size () [Inherited From Component]
@Deprecated
public void sizeColumnsToFit (boolean lastColumnOnly)
  Sizes the table columns to fit the available space.
public void sizeColumnsToFit (int resizingColumn)
  Obsolete as of Java 2 platform v1.4.
public void sorterChanged (RowSorterEvent e) [Specified in RowSorterListener]
  RowSorterListener notification that the RowSorter has changed in some way.
pack-private void superProcessMouseMotionEvent (MouseEvent e) [Inherited From JComponent]
public void tableChanged (TableModelEvent e) [Specified in TableModelListener]
  Invoked when this table's TableModel generates a TableModelEvent.
public String toString () [Inherited From Component]
  Returns a string representation of this component and its values.
public void transferFocus () [Inherited From Component]
  Transfers the focus to the next component, as though this Component were the focus owner.
public void transferFocusBackward () [Inherited From Container]
public void transferFocusDownCycle () [Inherited From Container]
  Transfers the focus down one focus traversal cycle.
public void transferFocusUpCycle () [Inherited From Component]
  Transfers the focus up one focus traversal cycle.
protected void unconfigureEnclosingScrollPane ()
  Reverses the effect of configureEnclosingScrollPane by replacing the columnHeaderView of the enclosing scroll pane with null.
public void unregisterKeyboardAction (KeyStroke aKeyStroke) [Inherited From JComponent]
  This method is now obsolete.
public void update (Graphics g) [Inherited From JComponent]
  Calls paint.
public void updateUI () [Overrides JComponent]
  Notification from the UIManager that the L&F has changed.
public void validate () [Inherited From Container]
  Validates this container and all of its subcomponents.
protected void validateTree () [Inherited From Container]
  Recursively descends the container tree and recomputes the layout for any subtrees marked as needing it (those marked as invalid).
public void valueChanged (ListSelectionEvent e) [Specified in ListSelectionListener]
  Invoked when the row selection changes -- repaints to show the new selection.
Fields
Hide/Show inherited fields
protected AccessibleContext accessibleContext [Inherited From JComponent]
The AccessibleContext associated with this JComponent.
publicfinalstatic int AUTO_RESIZE_ALL_COLUMNS = "4"
During all resize operations, proportionately resize all columns.
publicfinalstatic int AUTO_RESIZE_LAST_COLUMN = "3"
During all resize operations, apply adjustments to the last column only.
publicfinalstatic int AUTO_RESIZE_NEXT_COLUMN = "1"
When a column is adjusted in the UI, adjust the next column the opposite way.
publicfinalstatic int AUTO_RESIZE_OFF = "0"
Do not adjust column widths automatically; use a scrollbar.
publicfinalstatic int AUTO_RESIZE_SUBSEQUENT_COLUMNS = "2"
During UI adjustment, change subsequent columns to preserve the total width; this is the default behavior.
protected boolean autoCreateColumnsFromModel
The table will query the TableModel to build the default set of columns if this is true.
protected int autoResizeMode
Determines if the table automatically resizes the width of the table's columns to take up the entire width of the table, and how it does the resizing.
publicfinalstatic float BOTTOM_ALIGNMENT = "1.0" [Inherited From Component]
  Ease-of-use constant for getAlignmentY.
protectedtransient TableCellEditor cellEditor
  The active cell editor object, that overwrites the screen real estate occupied by the current cell and allows the user to change its contents.
protected boolean cellSelectionEnabled
  Obsolete as of Java 2 platform v1.3.
publicfinalstatic float CENTER_ALIGNMENT = "0.5" [Inherited From Component]
  Ease-of-use constant for getAlignmentY and getAlignmentX.
protected TableColumnModel columnModel
The TableColumnModel of the table.
protected TableModel dataModel
The TableModel of the table.
pack-privatestatic boolean DEBUG_GRAPHICS_LOADED [Inherited From JComponent]
Set to true when DebugGraphics has been loaded.
protectedtransient Hashtable defaultEditorsByColumnClass
A table of objects that display and edit the contents of a cell, indexed by class as declared in getColumnClass in the TableModel interface.
protectedtransient Hashtable defaultRenderersByColumnClass
A table of objects that display the contents of a cell, indexed by class as declared in getColumnClass in the TableModel interface.
protectedtransient int editingColumn
Identifies the column of the cell being edited.
protectedtransient int editingRow
Identifies the row of the cell being edited.
protectedtransient Component editorComp
If editing, the Component that is handling the editing.
pack-privatefinalstatic sun.awt.RequestFocusController focusController [Inherited From JComponent]
protected Color gridColor
The color of the grid.
publicfinalstatic float LEFT_ALIGNMENT = "0.0" [Inherited From Component]
  Ease-of-use constant for getAlignmentX.
protected EventListenerList listenerList [Inherited From JComponent]
A list of event listeners for this component.
pack-privatetransient Component paintingChild [Inherited From JComponent]
  Set in _paintImmediately.
protected Dimension preferredViewportSize
Used by the Scrollable interface to determine the initial visible area.
publicfinalstatic float RIGHT_ALIGNMENT = "1.0" [Inherited From Component]
  Ease-of-use constant for getAlignmentX.
protected int rowHeight
The height in pixels of each row in the table.
protected int rowMargin
The height in pixels of the margin between the cells in each row.
protected boolean rowSelectionAllowed
True if row selection is allowed in this table.
protected Color selectionBackground
The background color of selected cells.
protected Color selectionForeground
The foreground color of selected cells.
protected ListSelectionModel selectionModel
The ListSelectionModel of the table, used to keep track of row selections.
protected boolean showHorizontalLines
The table draws horizontal lines between cells if showHorizontalLines is true.
protected boolean showVerticalLines
The table draws vertical lines between cells if showVerticalLines is true.
protected JTableHeader tableHeader
The TableHeader working with the table.
publicfinalstatic String TOOL_TIP_TEXT_KEY = "ToolTipText" [Inherited From JComponent]
The comment to display when the cursor is over the component, also known as a "value tip", "flyover help", or "flyover label".
publicfinalstatic float TOP_ALIGNMENT = "0.0" [Inherited From Component]
  Ease-of-use constant for getAlignmentY().
protectedtransient ComponentUI ui [Inherited From JComponent]
The look and feel delegate for this component.
publicfinalstatic int UNDEFINED_CONDITION = "-1" [Inherited From JComponent]
Constant used by some of the APIs to mean that no condition is defined.
publicfinalstatic int WHEN_ANCESTOR_OF_FOCUSED_COMPONENT = "1" [Inherited From JComponent]
Constant used for registerKeyboardAction that means that the command should be invoked when the receiving component is an ancestor of the focused component or is itself the focused component.
publicfinalstatic int WHEN_FOCUSED = "0" [Inherited From JComponent]
Constant used for registerKeyboardAction that means that the command should be invoked when the component has the focus.
publicfinalstatic int WHEN_IN_FOCUSED_WINDOW = "2" [Inherited From JComponent]
Constant used for registerKeyboardAction that means that the command should be invoked when the receiving component is in the window that has the focus or is itself the focused component.
Nested Classes
  JTable.PrintMode
Printing modes, used in printing JTables.
  JTable.DropLocation
A subclass of TransferHandler.DropLocation representing a drop location for a JTable.
  JTable.NumberRenderer
Default Renderers
  JTable.DoubleRenderer
  JTable.DateRenderer
  JTable.IconRenderer
  JTable.BooleanRenderer
  JTable.GenericEditor
Default Editors
  JTable.NumberEditor
  JTable.BooleanEditor
  JTable.CellEditorRemover
  JTable.AccessibleJTable
This class implements accessibility support for the JTable class.
  JComponent.ActionStandin
ActionStandin is used as a standin for ActionListeners that are added via registerKeyboardAction.
  JComponent.IntVector
  JComponent.KeyboardState
  JComponent.AccessibleJComponent
Inner class of JComponent used to provide default support for accessibility.
  Container.AccessibleAWTContainer
Inner class of Container used to provide default support for accessibility.
  Component.BaselineResizeBehavior
Enumeration of the common ways the baseline of a component can change as the size changes.
  Component.FlipBufferStrategy
Inner class for flipping buffers on a component.
  Component.BltBufferStrategy
Inner class for blitting offscreen surfaces to a component.
  Component.AccessibleAWTComponent
Inner class of Component used to provide default support for accessibility.
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar