Hi everyone,
I'm having some problems with this JTable that is really making me mad. At first I could only get one combo box per column which isn't what I wanted. It had to have a combo box in each column but each cell needed different values. I found a way to fix that with this code:
This lets me have a different combo box in each cell for a column. However now I'm limited to 1 combo box per row. Does anybody know how I can have 2 different combo boxes per row?Code:for (int x = 0; x < jTabProducts.getRowCount(); x++) { Vector<String> vSides = productControl.selectSides(Integer.parseInt(jTabProducts.getValueAt(x, 0).toString())); JComboBox cb = new JComboBox(vSides); DefaultCellEditor ed = new DefaultCellEditor(cb); // tell the RowEditorModel to use ed for row 1 rm.addEditorForRow(x, ed); }
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks