Re: JTable - Windows Table Behavior?



Irian wrote:
is there a (simple) way to let a JTable behave like the Tables in many
Windows applications? Primarily I want the following: If one column is
resized by hand, only the following columns (all right neighbors)
should moved (not all other columns resized). The size of the screen
should only used for a "default" column width, but the user should be
able to make the JTable wider than the application (resulting in a
horizontal scrollbar).
JTable has a setAutoResize(int) method which can take several resize-modes.
Just call that method with the resize-mode of your choice.
See
<http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JTable.html#setAutoResizeMode(int)>

--
Thomas
.