# Class JTable

java.lang.Object
org.jmol.awtjs.swing.Component
org.jmol.awtjs.swing.Container
org.jmol.awtjs.swing.JComponent
org.jmol.awtjs.swing.JTable

All Implemented Interfaces:
  `ColumnSelectionModel, ListSelectionModel`

public class JTable extends JComponent implements ListSelectionModel, ColumnSelectionModel

## Field Summary

### Fields inherited from class JComponent

`actionCommand, actionListener, autoScrolls`

### Fields inherited from class Container

`list`

### Fields inherited from class Component

`enabled, height, id, minHeight, minWidth, mouseListener, name, parent, renderHeight, renderWidth, text, width`

## Constructor Summary

Constructors
Constructor
Description
`JTable(AbstractTableModel tableModel)`

## Method Summary

Modifier and Type
Method
Description
`void`
`addListSelectionListener(Object listener)`
It will be the function of the JavaScript on the page to do with selectionListener what is desired.
`void`
`clearSelection()`
`TableColumn`
`getColumn(int i)`
`ColumnSelectionModel`
`getColumnModel()`
`ListSelectionModel`
`getSelectionModel()`
`void`
`setCellSelectionEnabled(boolean enabled)`
`void`
`setPreferredScrollableViewportSize(Dimension dimension)`
`void`
`setRowSelectionAllowed(boolean b)`
`void`
`setRowSelectionInterval(int i, int j)`
`String`
`toHTML()`

### Methods inherited from class JComponent

`addActionListener, getActionCommand, setActionCommand, setAutoscrolls`

### Methods inherited from class Container

`add, addComponent, getComponent, getComponentCount, getComponents, getSubcomponentHeight, getSubcomponentWidth, insertComponent, remove, removeAll`

### Methods inherited from class Component

`addMouseListener, getCSSstyle, getHeight, getName, getParent, getText, getWidth, isEnabled, isVisible, newID, repaint, setBackground, setEnabled, setMinimumSize, setName, setParent, setPreferredSize, setText, setVisible`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### JTable

public JTable(AbstractTableModel tableModel)

## Method Details

### getSelectionModel

public ListSelectionModel getSelectionModel()

Specified by:
  `getSelectionModel` in interface `ColumnSelectionModel`

### getColumnModel

public ColumnSelectionModel getColumnModel()

### setPreferredScrollableViewportSize

public void setPreferredScrollableViewportSize(Dimension dimension)

### clearSelection

public void clearSelection()

### setRowSelectionAllowed

public void setRowSelectionAllowed(boolean b)

### setRowSelectionInterval

public void setRowSelectionInterval(int i, int j)

### setCellSelectionEnabled

public void setCellSelectionEnabled(boolean enabled)

### addListSelectionListener

public void addListSelectionListener(Object listener)
It will be the function of the JavaScript on the page to do with selectionListener what is desired.

Specified by:
  `addListSelectionListener` in interface `ListSelectionModel`
Parameters:
  `listener` -

### getColumn

public TableColumn getColumn(int i)

Specified by:
  `getColumn` in interface `ColumnSelectionModel`

### toHTML

public String toHTML()

Specified by:
  `toHTML` in class `Component`