Object[][] data = { {"Kathy", "Smith", "Snowboarding", new Integer(5), new Boolean(false)}, {"John", "Doe", "Rowing", new Integer(3), new Boolean(true)}, {"Sue", "Black", "Knitting", new Integer(2), new Boolean(false)}, {"Jane", "White", "Speed reading", new Integer(20), new Boolean(true)}, {"Joe", "Brown", "Pool", new Integer(10), new Boolean(false)} }; If you want to get around these restrictions, you need to implement your own table model, as described in Creating a Table Model.

updating cursor with multiple tables-12updating cursor with multiple tables-9

To customize initial column widths, you can invoke supplies getter and setter methods for the minimum, preferred, and maximum widths of a column, as well as a method for getting the current width.

For an example of setting cell widths based on an approximation of the space needed to draw the cells' contents, see the widths.

However, when table itself is resized — typically because the window has resized —; the columns' preferred widths do not change.

Instead, the existing preferred widths are used to calculate new column widths to fill the available space.

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.

When the user resizes a column by dragging its right border, then either other columns must change size, or the table's size must change.

By default, the table's size remains the same, and all columns to the right of the drag point resize to accommodate space added to or removed from the column to the left of the drag point.

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.

The user can select a contiguous range of rows or an arbitrary set of rows.