Action[] () { return new Action[] { new AbstractAction("Select &Current") { @Override public void actionPerformed(ActionEvent e) { ChangesBrowserNode<Change> component = (ChangesBrowserNode<Change>)myTreeList.getSelectionPath().getLastPathComponent(); myTreeList.excludeChanges(myChanges); } }, new AbstractAction("Select &All") { @Override public void actionPerformed(ActionEvent e) { myTreeList.includeChanges(myChanges); } } }; }