baseModelListener = new BaseTableModelListener(); model.addTableModelListener(baseModelListener);
model.addTableModelListener(new BaseTableModelListener());  final JTableHeader baseHeader = header; baseHeader.addMouseListener(new HeaderListener()); final TableCellRenderer 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 DefaultSortedTableModel( AbstractTableModel model ) {		baseModel = model;		baseModelListener = new BaseTableModelListener();		model.addTableModelListener(baseModelListener);		setupMapping();		ClassLoader classLoader = this.getClass().getClassLoader();		upIcon = new ImageIcon(classLoader.getResource("edu/umd/cs/findbugs/gui/up.png"));		downIcon = new ImageIcon(classLoader.getResource("edu/umd/cs/findbugs/gui/down.png"));	}