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.
you have to read How to Use Tables
you can put Icon or ImageIcon to the JTable’s Cell directly
for better help sooner edit your question with SSCCE demonstrated your issue with JTable