Adding JComboBox to a JTable cell [duplicate]
问题 Possible Duplicate: How to add a JComboBox to a JTable cell? I'm finding it difficult to add JComboBox to one of the cells of a JTable , I tried the code below but it's not working.. How can I add jcombobox to a particular cell? On pressing enter a new jcombobox should be added automatically to the desired column. jTable1 = new javax.swing.JTable(); mod=new DefaultTableModel(); mod.addColumn("No"); mod.addColumn("Item ID"); mod.addColumn("Units"); mod.addColumn("Amount"); mod.addColumn("UOM")