do you guys know if it is possible to put an entire row of a JTable into edit mode? I'm using a TableCellEditor to show a ComboBox/CheckBox/JButton in edit mode instead of the cell and this only works for the single cell that is edited
This will also work. Probably make life simpler too.
Manuel Etz wrote:Why do you think it could get ugly? The Components should only be visible in the row that is being edited
I think it can get ugly because you need to cater the edit/rendering/(maybe even validation) for each cell. Now if these cells are of different components (combo box, text field, check box, etc) you need to do a bunch of checking for each type then make it editable. IF validation is also done, document listener or other listeners are used. This will make the class really big even maybe have some inner classes ... even bigger.
Honestly I have not give it much thought yet.
Joined: Feb 22, 2013
It works better than expected. My only problem is, that the cell i want to edit is displayed as an empty cell without a cursor ...
The renderer seems to work and the cell editor works too if you take away the repaint call in the prepareEditor method
Why doesn't it work in combination? I don't get it ...