Reputation: 11
Trying to build a table with two columns and TextArea. Works great except for the first column is too narrow. Second column does growhorizontally as expected. Setting column width % removes the growhorizontally from second column. Any way around this?
Upvotes: 1
Views: 21
Reputation: 52770
Check out the JavaDoc for the Table class where it states:
The column width in percentages, -1 will use the preferred size. -2 for width will take up the rest of the available space
So you can use -2 but I find it simpler to just set values that add up to 100 to take up all available space.
Notice you just need to do this for the first row as all other rows will fit into the columns you defined.
Upvotes: 0