I am trying to add JComponents to JTable Cells. Do I Implement CellRenderer or CellEditor?
What you need is a custom editor which will return the JComboBox (or whatever component you want to use). You should check the Sun tutorial for JTable, it contains an example on how to use a JComboBox as an editor. If you want to use JComboBox as a renderer as well, the tutorial applies to that too.
2.1m questions
2.1m answers
60 comments
57.0k users