I'm trying to make a simple properties window using JTable with two columns: Property and Value. I want 'Value' column to be either textedit or checkbox. How to achive it?
Thanks in advance
I'm trying to make a simple properties window using JTable with two columns: Property and Value. I want 'Value' column to be either textedit or checkbox. How to achive it?
Thanks in advance
You should implement your custom TableCellRenderer and TableCellEditor.
Then retrieve the TableColumn you need to customize and set your class where you implemented those interfaces.
TableColumn column = table.getColumnModel().getColumn(vColIndex);
column.setCellRenderer(new YourCustomCellRenderer());
column.setCellEditor(new YourCustomCellEditor());