M
Martin Gregorie
I have a Jtable that used to display a number of columns, which are
respectively:
Col Class Caption Length (chars)
1 String License 14
2 String Date 19 (ccyy-mm-dd hh:mm:ss)
3 String Licenseee up to 80
4 String E-mail up to 80
5 String Phone 19
6 Boolean Issued 6 (length of the heading)
None of these are editable because a separate pop-up window is used to
amend and manipulate each license. This is all working well, but all the
columns are of equal width. I'd like to fix the lengths of columns 1,2,5
and 6 on order to leave the maximum amount of space for columns 3 and 4
but can't work out how.
It looks as though I should use DefaultTableCellRenderer but I can't work
out how to tell it how wide each column should be. This topic isn't
covered in the 'How to use Tables' tutorial, so any pointers would be
much appreciated.
respectively:
Col Class Caption Length (chars)
1 String License 14
2 String Date 19 (ccyy-mm-dd hh:mm:ss)
3 String Licenseee up to 80
4 String E-mail up to 80
5 String Phone 19
6 Boolean Issued 6 (length of the heading)
None of these are editable because a separate pop-up window is used to
amend and manipulate each license. This is all working well, but all the
columns are of equal width. I'd like to fix the lengths of columns 1,2,5
and 6 on order to leave the maximum amount of space for columns 3 and 4
but can't work out how.
It looks as though I should use DefaultTableCellRenderer but I can't work
out how to tell it how wide each column should be. This topic isn't
covered in the 'How to use Tables' tutorial, so any pointers would be
much appreciated.