Here you can find the source of getDefaultRenderer(JTable table, TableColumn column)
public static TableCellRenderer getDefaultRenderer(JTable table, TableColumn column)
//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); } } }