4
BufferedImage img = null;
        ImageIcon icon = null;
        try {
            img = ImageIO.read(new File("resources/" + imageString));           
        } catch (IOException e) {           
            e.printStackTrace();
        }
        img = ImageScaler.getScaledImage(img, 35, 35);
        icon = new ImageIcon(img);
table.setValueAt(icon, 1, 0);

this is my code. But image is not displayed. I need some help to find out where i went wrong.

vicky
  • 1,046
  • 2
  • 12
  • 25
  • The following link may help you ta add images to jtable.
    - [Add iamges to JTable](http://www.coderanch.com/t/340043/GUI/java/Adding-images-JTable)
    – Sachin Mhetre Apr 27 '12 at 07:11
  • Use this link it will help. - https://stackoverflow.com/questions/4941372/how-to-insert-image-into-jtable-cell - http://www.javareference.com/jrexamples/viewexample.jsp?id=125 look at this... – kannappan Apr 27 '12 at 07:14

1 Answers1

4
mKorbel
  • 109,525
  • 20
  • 134
  • 319