title: How to set icon in a column of JTable?
body: <p>I am able to set the column's header but not able to set icon in all the rows of first column of JTable.</p>
  
  <pre><code>public class iconRenderer extends DefaultTableCellRenderer{
      public Component getTableCellRendererComponent(JTable table,Object obj,boolean isSelected,boolean hasFocus,int row,int column){
          imageicon i=(imageicon)obj;
          if(obj==i)
              setIcon(i.imageIcon);
          setBorder(UIManager.getBorder("TableHeader.cellBorder"));
          setHorizontalAlignment(JLabel.CENTER);
          return this;
      }
  }
  
  public class imageicon{
      ImageIcon imageIcon;
      imageicon(ImageIcon icon){
          imageIcon=icon;
      }
  }  
  </code></pre>
  
  <hr>
  
  <p>and below lines in my BuildTable() method.</p>
  
  <pre><code>    public void SetIcon(JTable table, int col_index, ImageIcon icon){
        table.getTableHeader().getColumnModel().getColumn(col_index).setHeaderRenderer(new iconRenderer());
        table.getColumnModel().getColumn(col_index).setHeaderValue(new imageicon(icon));
  }
  </code></pre>
  
  <hr>
  
  <p>How can we set it for all rows of first columns? I have tried with for loop but didnt get yet for rows to iterate to set icon. Or is there any other way?</p>