Java JTable Cell Renderer getDefaultRenderer(JTable table, TableColumn column)

Here you can find the source of getDefaultRenderer(JTable table, TableColumn column)

Description

Return the default cell renderer for the given JTable column.

License

LGPL

Declaration

public static TableCellRenderer getDefaultRenderer(JTable table, TableColumn column) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

import javax.swing.JTable;

import javax.swing.table.TableCellRenderer;
import javax.swing.table.TableColumn;

public class Main {
    /**//from ww w . j  a v  a2 s. c om
     * Return the default cell renderer for the given JTable column.
     */
    public static TableCellRenderer getDefaultRenderer(JTable table, TableColumn column) {
        try {
            return table.getTableHeader().getDefaultRenderer();
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}

Related

  1. applyRenderers(final JTable table, final TableCellRenderer[] renderers)
  2. applyRenderers(final JTable table, final TableCellRenderer[] renderers)
  3. configureColumn(JTable table, int columnNumber, Integer width, TableCellRenderer renderer, TableCellEditor editor)
  4. createDefaultTableCellRenderer()
  5. getCellRenderer(final int hMargin)
  6. getTableCellRendererClass( Class propType)
  7. setCellRender(JTable table, int columnIdx, TableCellRenderer render)
  8. setTableRenderer(JTable table, Integer alignment)
  9. setUpCellRenderer(JTable table)