Exemplo n.º 1
0
 @Override
 public Component getTableCellEditorComponent(
     JTable table, Object value, boolean isSelected, int row, int column) {
   comp.setBackground(table.getSelectionBackground());
   comp.setOpaque(true);
   final ThumbData td = (ThumbData) value;
   comp.setFilePath(td.getOriginal());
   comp.setThumbPath(td.getThumb());
   return comp;
 }
Exemplo n.º 2
0
  @Override
  public Component getTableCellRendererComponent(
      JTable jtable, Object o, boolean isSelected, boolean hasFocus, int irow, int i1col) {
    comp.setBackground(isSelected ? jtable.getSelectionBackground() : jtable.getBackground());

    final ThumbData td = (ThumbData) o;
    comp.setFilePath(td.getOriginal());
    comp.setThumbPath(td.getThumb());
    return comp;
  }