boolean () { final TreePath selectionPath = myTree.getSelectionPath(); if (selectionPath != null){ final MyNode node = (MyNode)selectionPath.getLastPathComponent(); return !node.isDisplayInBold(); } else { return false; } }