Is it possible to setWeights to define the relative sizes of colums in a
table? Also when I have added colums, there is a space to right hand side
that is undefined, how do I get the colums to absorb this space?
Relative sizes are not supported, just pixel sizes.
You could attach a resize listener to the table.
(The resize event occurs at table creation, too.)
This would be the only possibility to get rid of the blind extra column
and implent relative sizes.
> Is it possible to setWeights to define the relative sizes of colums in a
> table? Also when I have added colums, there is a space to right hand
> side that is undefined, how do I get the colums to absorb this space?
my antecessor already proposed some good advice on this topic. I just wanted to add another option to address this problem. I always handle it this way:
1) Define a default width for all table columns
2) Add the user option to resize all colums that way that they adopt the width of the widest cell by using <i>TableColumn.pack()</i>. Add an accelerator for this as done in windows explorer (ctrl + plus) for example.
I switched to this solution since it doesn't restrict the user so much. Experience taught me that many users do not want a table to auto resize as the enclosing component, e.g. the window is resized.