Java Code Examples for javax.swing.table.TableColumn#setResizable()

The following examples show how to use javax.swing.table.TableColumn#setResizable() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MainPanel.java    From java-swing-tips with MIT License 7 votes vote down vote up
private MainPanel() {
  super(new BorderLayout());
  table.setRowSorter(new TableRowSorter<>(model));

  JScrollPane scrollPane = new JScrollPane(table);
  scrollPane.getViewport().setBackground(Color.WHITE);
  table.setComponentPopupMenu(new TablePopupMenu());
  table.setFillsViewportHeight(true);
  table.setIntercellSpacing(new Dimension());
  table.setShowGrid(false);
  table.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);

  TableColumn column = table.getColumnModel().getColumn(0);
  column.setMaxWidth(60);
  column.setMinWidth(60);
  column.setResizable(false);

  JButton button = new JButton("add");
  button.addActionListener(e -> addActionPerformed());
  add(button, BorderLayout.SOUTH);
  add(scrollPane);
  setPreferredSize(new Dimension(320, 240));
}
 
Example 2
Source File: TableEditor.java    From pentaho-reporting with GNU Lesser General Public License v2.1 6 votes vote down vote up
public void addColumn( final TableColumn column ) {
  stopEditing();
  if ( column.getHeaderValue() == null ) {
    final int modelColumn = column.getModelIndex();
    final String columnName = getModel().getColumnName( modelColumn );
    if ( modelColumn == 0 ) {
      column.setResizable( false );
      column.setHeaderValue( columnName );
      column.setPreferredWidth( 30 );
      column.setMaxWidth( 30 );
      column.setMinWidth( 30 );
    } else {
      final Class columnType = getModel().getColumnClass( modelColumn );
      column.setHeaderValue( new TypedHeaderInformation( columnType, columnName ) );
    }
  }
  getColumnModel().addColumn( column );

}
 
Example 3
Source File: ModuleSuiteDialog.java    From snap-desktop with GNU General Public License v3.0 6 votes vote down vote up
private JTable createAdaptersTable() {
    java.util.List<ToolAdapterOperatorDescriptor> toolboxSpis = new ArrayList<>();
    toolboxSpis.addAll(ToolAdapterRegistry.INSTANCE.getOperatorMap().values()
            .stream()
            .map(e -> (ToolAdapterOperatorDescriptor) e.getOperatorDescriptor())
            .collect(Collectors.toList()));
    toolboxSpis.sort(Comparator.comparing(ToolAdapterOperatorDescriptor::getAlias));
    AdapterListModel model = new AdapterListModel(toolboxSpis);
    operatorsTable = new JTable(model);
    operatorsTable.getSelectionModel().addListSelectionListener(e -> onSelectionChanged());
    TableColumn checkColumn = operatorsTable.getColumnModel().getColumn(0);
    int checkColumnWidth = 24;
    checkColumn.setMaxWidth(checkColumnWidth);
    checkColumn.setPreferredWidth(checkColumnWidth);
    checkColumn.setResizable(false);
    TableColumn aliasColumn = operatorsTable.getColumnModel().getColumn(1);
    aliasColumn.setPreferredWidth(10 * checkColumnWidth);
    return operatorsTable;
}
 
Example 4
Source File: GridDataTable.java    From osp with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Constructor GridDataTable
 * @param griddata
 * @param component
 */
public GridDataTable(GridData griddata, int component) {
  super();
  refreshTimer.setRepeats(false);
  refreshTimer.setCoalesce(true);
  tableModel = new GridTableModel(griddata, component);
  setModel(tableModel);
  setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
  String name = getColumnName(0);
  TableColumn column = getColumn(name);
  int width = 20;
  column.setMinWidth(width);
  column.setResizable(true);
  // column.setMaxWidth(width);
  column.setWidth(width);
  width = 60;
  for(int i = 1, n = getColumnCount(); i<n; i++) {
    name = getColumnName(i);
    column = getColumn(name);
    column.setMinWidth(width);
    column.setWidth(width);
    column.setResizable(true);
  }
  sizeColumnsToFit(0);
}
 
Example 5
Source File: Utilities.java    From pcgen with GNU Lesser General Public License v2.1 6 votes vote down vote up
public static TableColumn createTableColumn(int index, String headerValue, TableCellRenderer headerRenderer,
	boolean resizable)
{
	TableColumn column = new TableColumn(index);
	if (headerValue.startsWith("in_"))
	{
		column.setHeaderValue(LanguageBundle.getString(headerValue));
	}
	else
	{
		column.setHeaderValue(headerValue);
	}
	column.setHeaderRenderer(headerRenderer);
	if (!resizable)
	{
		column.sizeWidthToFit();
		column.setMaxWidth(column.getMaxWidth() + 10);
		column.setPreferredWidth(column.getPreferredWidth() + 10);
	}
	column.setResizable(resizable);
	return column;
}
 
Example 6
Source File: EquipmentModel.java    From pcgen with GNU Lesser General Public License v2.1 6 votes vote down vote up
public static void initializeTreeTable(JTreeTable treeTable)
{
	treeTable.getTree().setRowHeight(0);
	treeTable.setFocusable(false);
	treeTable.getTree().putClientProperty("JTree.lineStyle", "Horizontal");
	normFont = treeTable.getFont();
	headerFont = FontManipulation.title(normFont);
	biggerFont = FontManipulation.title(FontManipulation.xxlarge(normFont));
	lessFont = FontManipulation.less(normFont);
	treeTable.setAutoCreateColumnsFromModel(false);
	{
		DefaultTableColumnModel model = new DefaultTableColumnModel();
		CellRenderer renderer = new CellRenderer();
		TableColumn column = new TableColumn(0);
		column.setResizable(true);
		model.addColumn(column);
		model.addColumn(createFixedColumn(1, 75, renderer));
		model.addColumn(createFixedColumn(2, 75, renderer));
		model.addColumn(createFixedColumn(3, 50, renderer));
		model.addColumn(createFixedColumn(4, 50, renderer));
		treeTable.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
		treeTable.setColumnModel(model);
		treeTable.getTableHeader().setResizingAllowed(false);
	}
	treeTable.setTreeCellRenderer(new TreeRenderer());
}
 
Example 7
Source File: EncapsulateFieldPanel.java    From netbeans with Apache License 2.0 5 votes vote down vote up
private void setColumnWidth(int columnIndex) {
    TableColumn col = jTableFields.getColumnModel().getColumn(columnIndex);
    JCheckBox box = new JCheckBox();
    int width = (int) box.getPreferredSize().getWidth();
    col.setPreferredWidth(width);
    col.setMinWidth(width);
    col.setMaxWidth(width);
    col.setResizable(false);        
}
 
Example 8
Source File: PluginsPanel.java    From desktop with GNU General Public License v3.0 5 votes vote down vote up
private void initTable() {
    // Content Model & Renderer
    tblPlugins.setModel(new PluginsTableModel());
    //tblFolders.getC

    // Columns
    tblPlugins.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN);

    TableColumn colActive = tblPlugins.getColumnModel().getColumn(PluginsTableModel.COLUMN_INDEX_ACTIVE);
    colActive.setPreferredWidth(50);
    colActive.setMaxWidth(50);
    colActive.setResizable(false);

    TableColumn colRemote = tblPlugins.getColumnModel().getColumn(PluginsTableModel.COLUMN_INDEX_NAME);
    colRemote.setPreferredWidth(210);

    TableColumn colLocal = tblPlugins.getColumnModel().getColumn(PluginsTableModel.COLUMN_INDEX_VERSION);
    colLocal.setPreferredWidth(120);

    // Other stuff
    tblPlugins.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    tblPlugins.setShowHorizontalLines(false);
    tblPlugins.setShowVerticalLines(false);
    tblPlugins.setBorder(BorderFactory.createEmptyBorder());

    // Listeners
    tblPlugins.getSelectionModel().addListSelectionListener(new ListSelectionListener() {

        @Override
        public void valueChanged(ListSelectionEvent e) {
            btnDelete.setEnabled(e.getFirstIndex() >= 0);
        }
    });
}
 
Example 9
Source File: MainPanel.java    From java-swing-tips with MIT License 5 votes vote down vote up
private MainPanel() {
  super(new BorderLayout());
  UIManager.put("ComboBox.buttonDarkShadow", UIManager.getColor("TextField.foreground"));

  String[] comboModel = {"Name 0", "Name 1", "Name 2"};
  String[] columnNames = {"Integer", "String", "Boolean"};
  Object[][] data = {
    {12, comboModel[0], true}, {5, comboModel[2], false},
    {92, comboModel[1], true}, {3, comboModel[0], false}
  };
  TableModel model = new DefaultTableModel(data, columnNames) {
    @Override public Class<?> getColumnClass(int column) {
      return getValueAt(0, column).getClass();
    }
  };
  JTable table = new JTable(model);
  TableColumn col = table.getColumnModel().getColumn(0);
  col.setMinWidth(60);
  col.setMaxWidth(60);
  col.setResizable(false);

  col = table.getColumnModel().getColumn(1);
  col.setCellEditor(new DefaultCellEditor(makeComboBox(new DefaultComboBoxModel<>(comboModel))));
  // table.setDefaultEditor(JComboBox.class, new DefaultCellEditor(combo));

  table.setAutoCreateRowSorter(true);
  add(new JScrollPane(table));
  setPreferredSize(new Dimension(320, 240));
}
 
Example 10
Source File: MainPanel.java    From java-swing-tips with MIT License 5 votes vote down vote up
private MainPanel() {
  super(new BorderLayout());
  table.setRowSorter(new TableRowSorter<>(model));
  addProgressValue("Name 1", 100, null);
  ExecutorService executor = Executors.newSingleThreadExecutor();

  JScrollPane scrollPane = new JScrollPane(table);
  scrollPane.getViewport().setBackground(Color.WHITE);
  table.setComponentPopupMenu(new TablePopupMenu(executor));
  table.setFillsViewportHeight(true);
  table.setIntercellSpacing(new Dimension());
  table.setShowGrid(false);
  table.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);

  TableColumn column = table.getColumnModel().getColumn(0);
  column.setMaxWidth(60);
  column.setMinWidth(60);
  column.setResizable(false);

  addHierarchyListener(e -> {
    if ((e.getChangeFlags() & HierarchyEvent.DISPLAYABILITY_CHANGED) != 0 && !e.getComponent().isDisplayable()) {
      executor.shutdownNow();
    }
  });

  JButton button = new JButton("add");
  button.addActionListener(e -> addActionPerformed(executor));
  add(button, BorderLayout.SOUTH);
  add(scrollPane);
  setPreferredSize(new Dimension(320, 240));
}
 
Example 11
Source File: KseFrame.java    From keystore-explorer with GNU General Public License v3.0 5 votes vote down vote up
private void setColumnsToIconSize(JTable keyStoreTable, int... columnNumbers) {
	for (int i : columnNumbers) {
		TableColumn typeCol = keyStoreTable.getColumnModel().getColumn(i);
		typeCol.setResizable(false);
		typeCol.setMinWidth(ICON_SIZE);
		typeCol.setMaxWidth(ICON_SIZE);
		typeCol.setPreferredWidth(ICON_SIZE);
	}
}
 
Example 12
Source File: TableUtil.java    From consulo with Apache License 2.0 5 votes vote down vote up
public static void setupCheckboxColumn(@Nonnull TableColumn column) {
  int checkboxWidth = new JCheckBox().getPreferredSize().width;
  column.setResizable(false);
  column.setPreferredWidth(checkboxWidth);
  column.setMaxWidth(checkboxWidth);
  column.setMinWidth(checkboxWidth);
}
 
Example 13
Source File: MemoryMapProvider.java    From ghidra with Apache License 2.0 5 votes vote down vote up
/**
	 * Set up the table so it looks well arranged.
	 */
	private void arrangeTable() {
		// memTable.setRowHeight(20);
		TableColumn column;

		column = memTable.getColumn(MemoryMapModel.READ_COL);
		column.setMaxWidth(25);
		column.setMinWidth(25);
		column.setResizable(false);

		column = memTable.getColumn(MemoryMapModel.WRITE_COL);
		column.setMaxWidth(25);
		column.setMinWidth(25);
		column.setResizable(false);

		column = memTable.getColumn(MemoryMapModel.EXECUTE_COL);
		column.setMaxWidth(25);
		column.setMinWidth(25);
		column.setResizable(false);

		column = memTable.getColumn(MemoryMapModel.VOLATILE_COL);
		column.setMaxWidth(57);
		column.setMinWidth(57);
		column.setResizable(false);

		column = memTable.getColumn(MemoryMapModel.OVERLAY_COL);
		column.setMaxWidth(55);
		column.setMinWidth(55);
		column.setResizable(false);

		column = memTable.getColumn(MemoryMapModel.BLOCK_TYPE_COL);
		column.setMinWidth(60);
//		column.setResizable(true);

		column = memTable.getColumn(MemoryMapModel.INIT_COL);
		column.setMaxWidth(68);
		column.setMinWidth(68);
		column.setResizable(false);
	}
 
Example 14
Source File: ClasspathPanelImpl.java    From consulo with Apache License 2.0 4 votes vote down vote up
private void setFixedColumnWidth(final int columnIndex, final String textToMeasure) {
  final TableColumn column = myEntryTable.getTableHeader().getColumnModel().getColumn(columnIndex);
  column.setResizable(false);
  column.setMaxWidth(column.getPreferredWidth());
}
 
Example 15
Source File: MainPanel.java    From java-swing-tips with MIT License 4 votes vote down vote up
private MainPanel() {
  super(new GridBagLayout());

  String[] columnNames = {"A", "B", "C", "D", "E", "F", "G", "H", "I"};
  Boolean[][] data = {
    {true, false, true, false, true, true, false, true, true},
    {true, false, true, false, true, true, false, true, true},
    {true, false, true, false, true, true, false, true, true},
    {true, false, true, false, true, true, false, true, true},
    {true, false, true, false, true, true, false, true, true},
    {true, false, true, false, true, true, false, true, true},
    {true, false, true, false, true, true, false, true, true},
    {true, false, true, false, true, true, false, true, true},
    {true, false, true, false, true, true, false, true, true}
  };

  TableModel model = new DefaultTableModel(data, columnNames) {
    @Override public Class<?> getColumnClass(int column) {
      return Boolean.class;
    }
  };

  JTable table = new JTable(model) {
    @Override public void updateUI() {
      setDefaultEditor(Boolean.class, null);
      super.updateUI();
      setDefaultEditor(Boolean.class, new BooleanEditor());
    }

    @Override public Dimension getPreferredScrollableViewportSize() {
      return super.getPreferredSize();
    }
  };

  table.setCellSelectionEnabled(true);
  table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
  table.setAutoCreateRowSorter(true);
  table.setComponentPopupMenu(new TablePopupMenu());

  TableColumnModel m = table.getColumnModel();
  for (int i = 0; i < m.getColumnCount(); i++) {
    TableColumn col = m.getColumn(i);
    col.setPreferredWidth(CELLSIZE);
    col.setResizable(false);
  }

  JScrollPane scroll = new JScrollPane(table);
  scroll.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
  scroll.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);

  add(scroll);
  setPreferredSize(new Dimension(320, 240));
}
 
Example 16
Source File: MainPanel.java    From java-swing-tips with MIT License 4 votes vote down vote up
private MainPanel() {
  super(new BorderLayout());

  RowDataModel model = new RowDataModel();
  model.addRowData(new RowData("Name 1", "Comment..."));
  model.addRowData(new RowData("Name 2", "Test"));
  model.addRowData(new RowData("Name d", "ee"));
  model.addRowData(new RowData("Name c", "Test cc"));
  model.addRowData(new RowData("Name b", "Test bb"));
  model.addRowData(new RowData("Name a", "ff"));
  model.addRowData(new RowData("Name 0", "Test aa"));
  model.addRowData(new RowData("Name 0", "gg"));

  JTable table = new JTable(model) {
    @Override public void updateUI() {
      super.updateUI();
      TableColumn col = getColumnModel().getColumn(0);
      col.setMinWidth(60);
      col.setMaxWidth(60);
      col.setResizable(false);

      col = getColumnModel().getColumn(BUTTON_COLUMN);
      col.setCellRenderer(new DeleteButtonRenderer());
      col.setCellEditor(new DeleteButtonEditor());
      col.setMinWidth(20);
      col.setMaxWidth(20);
      col.setResizable(false);
    }
    // @Override public int rowAtPoint(Point pt) {
    //   // [JDK-6291631] JTable: rowAtPoint returns 0 for negative y - Java Bug System
    //   // https://bugs.openjdk.java.net/browse/JDK-6291631
    //   return pt.y < 0 ? -1 : super.rowAtPoint(pt);
    // }
  };

  TableRowSorter<? extends TableModel> sorter = new TableRowSorter<>(model);
  table.setRowSorter(sorter);
  sorter.setSortable(BUTTON_COLUMN, false);

  JButton button = new JButton("add");
  button.addActionListener(e -> model.addRowData(new RowData("Test", "aaaaaaaaaaa")));

  add(button, BorderLayout.SOUTH);
  add(new JScrollPane(table));
  setPreferredSize(new Dimension(320, 240));
}
 
Example 17
Source File: MainPanel.java    From java-swing-tips with MIT License 4 votes vote down vote up
private MainPanel() {
  super(new BorderLayout());
  String[] columnNames = {"String", "Integer", "Boolean"};
  Object[][] data = {
      {"aaa", 12, true}, {"bbb", 5, false},
      {"CCC", 92, true}, {"DDD", 0, false}
  };
  TableModel model = new DefaultTableModel(data, columnNames) {
    @Override public Class<?> getColumnClass(int column) {
      // ArrayIndexOutOfBoundsException: 0 >= 0
      // [JDK-6967479] JTable sorter fires even if the model is empty - Java Bug System
      // https://bugs.openjdk.java.net/browse/JDK-6967479
      // return getValueAt(0, column).getClass();
      switch (column) {
        case 0: return String.class;
        case 1: return Number.class;
        case 2: return Boolean.class;
        default: return super.getColumnClass(column);
      }
    }
  };
  JTable table = new JTable(model);
  table.setAutoCreateRowSorter(true);
  table.setRowSelectionAllowed(true);
  table.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);

  TableColumn col = table.getColumnModel().getColumn(0);
  col.setMinWidth(60);
  col.setMaxWidth(60);
  col.setResizable(false);

  JScrollPane scroll = new JScrollPane(table);
  scroll.setComponentPopupMenu(new TablePopupMenu());
  // scroll.getViewport().setInheritsPopupMenu(true); // 1.5.0
  table.setInheritsPopupMenu(true);
  // table.setFillsViewportHeight(true);

  scroll.getViewport().setOpaque(true);
  // scroll.getViewport().setBackground(Color.WHITE);

  JCheckBox check = new JCheckBox("viewport setOpaque", true);
  check.addActionListener(e -> {
    scroll.getViewport().setOpaque(((JCheckBox) e.getSource()).isSelected());
    scroll.repaint();
  });

  JButton button = new JButton("Choose background color");
  button.addActionListener(e -> {
    Color color = JColorChooser.showDialog(getRootPane(), "background color", scroll.getViewport().getBackground());
    scroll.getViewport().setBackground(color);
    scroll.repaint();
  });

  JPanel pnl = new JPanel();
  pnl.add(check);
  pnl.add(button);

  add(scroll);
  add(pnl, BorderLayout.SOUTH);
  setPreferredSize(new Dimension(320, 240));
}
 
Example 18
Source File: MainPanel.java    From java-swing-tips with MIT License 4 votes vote down vote up
private MainPanel() {
  super(new BorderLayout());

  String[] columnNames = {"Integer", "String", "Boolean"};
  Object[][] data = {
    {12, "aaa", true}, {5, "bbb", false},
    {92, "CCC", true}, {0, "DDD", false}
  };
  TableModel model = new DefaultTableModel(data, columnNames) {
    @Override public Class<?> getColumnClass(int column) {
      return getValueAt(0, column).getClass();
    }
  };
  // JTable table = new JTable(model) {
  //   @Override public Component prepareRenderer(TableCellRenderer tcr, int row, int column) {
  //     Component c = super.prepareRenderer(tcr, row, column);
  //     if (1 == convertColumnIndexToModel(column)) {
  //       initLabel((JLabel) c, row);
  //     } else {
  //       ((JLabel) c).setHorizontalAlignment(SwingConstants.RIGHT);
  //     }
  //     return c;
  //   }
  // };
  JTable table = new JTable(model);
  table.setAutoCreateRowSorter(true);

  TableColumn col = table.getColumnModel().getColumn(0);
  col.setMinWidth(60);
  col.setMaxWidth(60);
  col.setResizable(false);

  col = table.getColumnModel().getColumn(1);
  col.setCellRenderer(new HorizontalAlignmentTableRenderer());

  col = table.getColumnModel().getColumn(2);
  col.setHeaderRenderer(new HeaderRenderer());

  ButtonGroup bg = new ButtonGroup();
  JPanel p = new JPanel();
  Stream.of(leftRadio, centerRadio, rightRadio, customRadio).forEach(rb -> {
    bg.add(rb);
    p.add(rb);
    rb.addActionListener(e -> table.repaint());
  });

  add(p, BorderLayout.NORTH);
  add(new JScrollPane(table));
  setPreferredSize(new Dimension(320, 240));
}
 
Example 19
Source File: TraceTableModel.java    From pega-tracerviewer with Apache License 2.0 3 votes vote down vote up
@Override
protected TableColumnModel getTableColumnModel() {

    TableColumnModel tableColumnModel = new DefaultTableColumnModel();

    for (int i = 0; i < getColumnCount(); i++) {

        TableColumn tableColumn = new TableColumn(i);

        String text = getColumnName(i);

        tableColumn.setHeaderValue(text);

        TraceTableModelColumn ttmc = getColumn(i);

        TraceTableCellRenderer ttcr = new TraceTableCellRenderer();
        ttcr.setBorder(new EmptyBorder(1, 3, 1, 1));
        ttcr.setHorizontalAlignment(ttmc.getHorizontalAlignment());

        tableColumn.setCellRenderer(ttcr);

        int colWidth = ttmc.getPrefColumnWidth();
        tableColumn.setPreferredWidth(colWidth);
        // tableColumn.setMinWidth(colWidth);
        tableColumn.setWidth(colWidth);
        tableColumn.setResizable(true);

        tableColumnModel.addColumn(tableColumn);
    }

    return tableColumnModel;
}
 
Example 20
Source File: TraceTreeTable.java    From pega-tracerviewer with Apache License 2.0 2 votes vote down vote up
@Override
protected void setTreeTableColumnModel() {

    TreeTableModelAdapter model = (TreeTableModelAdapter) getModel();
    TableColumnModel tableColumnModel = new DefaultTableColumnModel();

    for (int i = 0; i < model.getColumnCount(); i++) {

        TableColumn tableColumn = new TableColumn(i);

        TreeTableColumn treeTableColumn = model.getColumn(i);

        String text = treeTableColumn.getDisplayName();

        Class<?> columnClass = treeTableColumn.getColumnClass();

        int preferredWidth = treeTableColumn.getPrefColumnWidth();

        tableColumn.setHeaderValue(text);
        tableColumn.setPreferredWidth(preferredWidth);

        TableCellRenderer tcr = null;

        if (TreeTableColumn.TREE_COLUMN_CLASS.equals(columnClass)) {

            DefaultTreeTableTree treeTableTree = getTree();
            tcr = treeTableTree;
            tableColumn.setCellEditor(new TreeTableCellEditor(treeTableTree));
        } else {

            TraceTreeTableCellRenderer ltcr = new TraceTreeTableCellRenderer();
            ltcr.setBorder(new EmptyBorder(1, 3, 1, 1));
            ltcr.setHorizontalAlignment(treeTableColumn.getHorizontalAlignment());

            tableColumn.setCellEditor(new TreeTableCellEditor(ltcr));

            tcr = ltcr;
        }

        tableColumn.setCellRenderer(tcr);

        tableColumn.setResizable(true);

        tableColumnModel.addColumn(tableColumn);
    }

    setColumnModel(tableColumnModel);
}