QUOTE(fsloke @ 8 May, 2008 - 09:43 AM)

Can I do the table as a Excel table?
When It double click the it will be find the highest character then fixed to the highest character width column....
Can?
Sure but kind of useless... the user can ajust by himself the width of the columns by clicking in the header between two column
But if you still want the feature you'll have to add a ListSelectionListener to your table and to something like that in it
CODE
jtable.addListSelectionListener(new SelectionListener());
and as inner class
class SelectionListener implements ListSelectionListener {
// use to detect double clik
long lastCall;
public void valueChanged(ListSelectionEvent e) {
if(e.getValueIsAdjusting()) // mouse button not released yet
return;
// to determine double click
long now = System.currentTimeMillis();
if(now - lastCall < 100) { // double click must me in 1/10 second
lastCall = now;
return;
}
// ok it is a double click
lastCall = 0;
int col = getSelectedColumn();
if(col < 0) // true during a clearSelection
return;
// now your code to scan the row
// find the largest one
// set the size of the column
clearSelection();
}
}