For example: By default, all columns in a table start out with equal width, and the columns automatically fill the entire width of the table.
When the table becomes wider or narrower (which might happen when the user resizes the window containing the table), all the column widths change appropriately.
You can change a table's resize behavior by invoking .
In its default configuration, a table supports a selection that consists of one or more rows.
Under "Selection Mode" there are a set of radio buttons. All of the radio buttons under "Selection Mode" invoke ), there is no selection; only the lead selection is shown.
You may notice that the "Cell Selection" checkbox is disabled in multiple interval selection mode.
To choose the renderer that displays the cells in a column, a table first determines whether you specified a renderer for that particular column.
If you did not, then the table invokes the table model's method, which gets the data type of the column's cells.
Instead, a single is generally used to draw all of the cells that contain the same type of data.
This example program presents the familiar table, and allows the user to manipulate certain JTable options.