JTable中如何添加控件
已经建好了一个JTable,现在我想在中间的某列添加JComboBox,怎么才能实现? --------------------编程问答-------------------- JTable表格某列加JComboBox:TableColumn column = table.getColumnModel().getColumn(2);
...
JComboBox comboBox = new JComboBox();
comboBox.addItem("Snowboarding");
comboBox.addItem("Rowing");
comboBox.addItem("Chasing toddlers");
comboBox.addItem("Speed reading");
comboBox.addItem("Teaching high school");
comboBox.addItem("None");
column.setCellEditor(new DefaultCellEditor(comboBox));
补充:Java , Java SE