I want to change defaultCellEditor to JComboBox only when a specific cell in a table is selected.
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
Override the getCellEditor(...) method of JTable to return the appropriate editor. Something like:
Just have your
TableModel
return true fromisCellEditable()
for that cell.If you use netbeans, then type this code under jbutton action performed.
You should have jtable,and jcombobox with several items. Try this single code :