By Default, java swing table or JTable is only use for text information inside it. By doing this, you will able to show Images inside your JTable. Here we go. 🙂
This is the way I put data inside my JTable, it include text and image in byte[] that need to show.

DefaultTableModel dtm = (DefaultTableModel) jtable.getModel();

//adding data into new row of table

//using custom renderer in column 1 (column where image should be put)
jtable.getColumnModel().getColumn(1).setCellRenderer(new ImageRenderer());

This is the custom ImageRenderer which called when adding a new row.

class ImageRenderer extends DefaultTableCellRenderer

    public Component getTableCellRendererComponent(JTable table,Object value, boolean isSelected,boolean hasFocus, int row, int column)
        JLabel label = new JLabel();

        if (value!=null) {
        //value is parameter which filled by byteOfImage
        label.setIcon(new ImageIcon((byte[])value));

        return label;

Easy isn’t? Hope this post help you 😉 and for info about my newest post, dont forget to :