> Hi,
>
[quoted text clipped - 4 lines]
> display. I need customize my table column, can you please guide me how
> I can give column width for proper column width?
JTable table;
int column, width;
...
table.getColumnModel().getColumn(column).setPreferredWidth(width);
Usually I have the table in a JScrollPane in a layout that allows it to
resize to the max size allowed by window size & other components. In
this case the preferred widths of the columns is used to set the widths
of the columns RELATIVE to one another. As a rule of thumb I set the
width to 10 x the number of characters I expect the column to contain.
AimsLife - 13 Sep 2007 07:56 GMT
Thanks
Regards,
-aimslife
On Sep 12, 11:37 pm, RedGrittyBrick <RedGrittyBr...@SpamWeary.foo>
wrote:
> > Hi,
>
[quoted text clipped - 15 lines]
> of the columns RELATIVE to one another. As a rule of thumb I set the
> width to 10 x the number of characters I expect the column to contain.