I trying to add image using ImageIcon
class to jTable
cell , but i get in the cell sun.awt.image.ToolkitImage@196a4632
where it supposed to display image in the cell
the code i tried :
JTable jTable;
String[] columns={"Page No","Chapter","Image"};
Object[][] rows={{1,4,null},{2,7,null}}}
public Tab_ImgIcn(){
ImageIcon icon=new ImageIcon(getClass().getResource("exit.png"));
jTable= new JTable(rows, columns);
jTable.setValueAt(icon.getImage(), 0,3);
JScrollPane jps = new JScrollPane(jTable);
frame.add(jps);
}