private CheckedTreeNode getSelectedNode() {
   TreePath selectionPath = myTree.getSelectionPath();
   if (selectionPath != null) {
     return (CheckedTreeNode) selectionPath.getLastPathComponent();
   }
   return null;
 }