baseHeader.addMouseListener(headerListener);
baseHeader.addMouseListener(headerListener); baseRenderer = baseHeader.getDefaultRenderer(); baseHeader.setDefaultRenderer( new DefaultTableCellRenderer() { public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { JLabel label = (JLabel)baseRenderer.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); if (baseHeader.getTable().convertColumnIndexToModel(column) == sortColumn) { if (sortDirection != SORT_NO_ORDER) { label.setHorizontalTextPosition(SwingConstants.LEFT); label.setIcon( sortDirection == SORT_ASCENDING_ORDER ? downIcon : upIcon ); } else { label.setIcon(null); } } else { label.setIcon(null); } return label; }  });
	public void setBaseTableHeader( JTableHeader header ) {		if (baseHeader != null)			baseHeader.removeMouseListener(headerListener);		baseHeader = header;		baseHeader.addMouseListener(headerListener);		}