Forums Register Login

JTable column behaviour

+Pie Number of slices to send: Send
Hi,
on my development machine (jre 1.3.1), my JTable columns fill up my JTable by default. On my client machines, (jre 1.2.2), the default behaviour appears to be that the columns only fill up about half the table area.
I've tried calling the method sizeColumnsToFit(true); and I tried sizeColumnsToFit(1); naively thinking this would size the Columns To Fit the table, by using column 1 to fill the space ... but it did nothing.
Any ideas ?
Kate
+Pie Number of slices to send: Send
Take a look at http://java.sun.com\docs\books\tutorial\uiswing\components\table.html
in the section "Setting and changing column widths".
------------------
Laurent Leonard
Laurent.Leonard@belgique.com
+Pie Number of slices to send: Send
Thanks,
I use those examples a lot to learn from. However, they advise that

By default, all columns in a table start out with equal width, and the columns automatically fill the entire width of the table


which, is precisely my problem. Under jre 1.22, they do not.
So, what I was wondering was whether anyone had experience of peculiar column resize behaviour. (Actally, I know that lots of people have had lots of problems with JTable column sizing as it used to be very buggy )
Cheers,
Kate
Happily living in the valley of the dried frogs with a few tiny ads.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 937 times.
Similar Threads
JTable
jtable
JTable Problem
JTable column widths
JTable
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 16:07:04.