How to use custom JTable cell editor and cell renderer
问题 I have created a JTable with a custom table render and custom cell editor which gives the result in the image I created the panel shown in the first table cells using a separate class which extended JPanel. and add table values as, tbl.setCellEditor(new customCell()); tbl.getColumnModel().getColumn(0).setCellRenderer(new customCell()); DefaultTableModel dtm = (DefaultTableModel) tbl.getModel(); Vector v = new Vector(); v.add(new Panel()); v.add("Test"); dtm.addRow(v); v.clear(); v.add(new