Hello All, I have posted here in the past about JComboBox and you lot have helped me out greatly. I have one more problem then I can stop nagging you. the code below puts values from a database into 2 combo boxes, and puts those combo boxes in to the JTabel. when the code is run the cells in the JTable are first of all cells untill I click into a cell it then changes to a Combo Box, I want the JTable to always display each cell as Combo Boxes. I hope you understand what I mean? Thanks Ben
Hi Nigel, I have done what you said but I got this error C:\j21work>javac ComboBoxTable.java ComboBoxTable.java:98: cannot resolve symbol symbol : constructor DefaultCellEditor (javax.swing.DefaultCellEditor) location: class javax.swing.DefaultCellEditor tcm.getColumn(0).setCellEditor(new DefaultCellEditor(editor2)); ^ 1 error Thanks Ben
Joined: May 15, 2001
Yes sorry I hadn't read your code properly. The argument should be the name of your JCombo e.g.