List of utility methods to do JTable Column Install
TableColumn | addColumn(JTable table, TableCellRenderer renderer, TableCellEditor editor) add Column return addColumn(table, renderer, null, editor);
|
PropertyChangeListener | addColumnModelTracker(JTable p_Table, final TableColumnModelListener p_Listener) add Column Model Tracker PropertyChangeListener propListener = new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent event) { TableColumnModel oldModel = (TableColumnModel) event.getOldValue(); TableColumnModel newModel = (TableColumnModel) event.getNewValue(); if (oldModel != null) { oldModel.removeColumnModelListener(p_Listener); if (newModel != null) { newModel.addColumnModelListener(p_Listener); }; p_Table.addPropertyChangeListener("columnModel", propListener); p_Table.getColumnModel().addColumnModelListener(p_Listener); return propListener; |
PropertyChangeListener | addColumnModelTracker(JTable p_Table, final TableColumnModelListener p_Listener) add Column Model Tracker PropertyChangeListener propListener = new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent event) { TableColumnModel oldModel = (TableColumnModel) event.getOldValue(); TableColumnModel newModel = (TableColumnModel) event.getNewValue(); if (oldModel != null) oldModel.removeColumnModelListener(p_Listener); if (newModel != null) newModel.addColumnModelListener(p_Listener); ... |