> We trigger the hide/show of columns in a JTable from a JPopupMenu
> displayed on a right mouse button click. When the hide column menu
> option is selected we call the
> TableColumnModel.removeColumn(TableColumn) function and an exception
> is thrown.
This happens if you modify the TableColumnModel while dragging is in
process (which is between button press and release) such that the dragged
column is removed.
Either use SwingUtilities.invokeLater to remove the column, or manually
set the JTableHeader's draggedColumn/Distance to null/0 and repaint it.
Christian
Nige - 26 Jan 2004 16:59 GMT
> > We trigger the hide/show of columns in a JTable from a JPopupMenu
> > displayed on a right mouse button click. When the hide column menu
[quoted text clipped - 10 lines]
>
> Christian
Christian,
You were spot on, thank you very much indeed,
Nigel