void (@NotNull PropertyChangeEvent evt) { UIUtil.repaintViewport(JBTable.this); if (evt.getOldValue() instanceof TableModel) { ((TableModel)evt.getOldValue()).removeTableModelListener(modelListener); } if (evt.getNewValue() instanceof TableModel) { ((TableModel)evt.getNewValue()).addTableModelListener(modelListener); } }