public void popupMenuWillBecomeVisible(PopupMenuEvent arg0) {
				try {
					mntmCreateObject.setEnabled(getSelectedNode() instanceof RoomTreeNode);
					mntmEditObject.setEnabled(getSelectedNode() instanceof ObjectTreeNode);
					mntmRemoveObject.setEnabled(getSelectedNode() instanceof ObjectTreeNode);
					
					mntmRemoveRoom.setEnabled(getSelectedNode() instanceof RoomTreeNode);
					mntmEditRoom.setEnabled(getSelectedNode() instanceof RoomTreeNode);
					mntmProgramObject.setEnabled(getSelectedNode() instanceof ObjectTreeNode);
					
				} catch (Exception e) {
					e.printStackTrace();
				}	
			}