Hello,

I have a JTable in a JScrollPane whose number of columns and column
names are generated at runtime.

Since the number of columns may be large I opted to use the
AUTO_RESIZE_OFF setting so that the Horizontal Scrollbar can
appear and be used to scroll and view the different columns.

Now my problem is that sometimes the number of columns is small
(minimum is 2) and this will appear very un-neat for the table's
appearance since it will only take half the JScrollPane (apart from
that the unused area sometimes gets filled up with garbage when I
scroll vertically).

What I wish is that initially, all the columns are resized to fit the
width of the table, (identical to the way the AUTO_RESIZE_ALL_COLUMNS
works) but then the user can choose to expand the width of the columns
and then the Horizontal scrollbar appears.

How can I go about it?

Thanks,

 Josef                          mailto:[EMAIL PROTECTED]


_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing

Reply via email to