void () { final MyTableModelListener listener = new MyTableModelListener(); if (myEqualsPanel != null) myEqualsPanel.getTable().getModel().addTableModelListener(listener); if (myHashCodePanel != null) myHashCodePanel.getTable().getModel().addTableModelListener(listener); }