public class picIO extends Component{ BufferedImage ig; public void paint(Graphics p) { p.drawImage(ig, 0, 0,this); } public Dimension getPreferredSize() { if(ig==null) { return new Dimension(30,40); } else { return new Dimension(ig.getWidth(),ig.getHeight()); } } public picIO(String file) { try { File f=new File(file); ig=ImageIO.read(f); } catch(IOException e) { } } } and also a class that extends DefaultTableModel in it wrote... public class getColumnClass(int col) { if(d[col]=="image") return picIO.class; } problem that arose:- when I gave the file name in the cell of the table output is the classname itself i.e. picIO@79v345 this 79v345 is the random number of the file that i chose what can be done to make visible the image
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)