TableCellRenderer (final LogFileOptions p0) { return new DefaultTableCellRenderer() { @Override public @NotNull Component getTableCellRendererComponent(@NotNull JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { final Component renderer = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); setText(((LogFileOptions)value).getName()); setBackground(isSelected ? table.getSelectionBackground() : table.getBackground()); setBorder(null); return renderer; } }; }