private JPopupMenu getTabsPopupMenu() {
	    JPopupMenu popup = new JPopupMenu("Tabs");
	    // Tabs -> Part
	    JMenuItem menuItemPart = new JMenuItem("Part");
	    menuItemPart.addActionListener(new ActionListener() { 
	      public void actionPerformed(ActionEvent e) { 
	        Component component = getSelectedComponent();
	        if (!(component instanceof ConsolePanel)) {
	          String chan = ((PanelTemplate)component).getWindowName();
	          if (isConnected() && component instanceof ChanPanel) 
	            conn.doPart(chan);
	          else if (component instanceof QueryPanel)
	            closePanel(chan);
	        }
	      } 
	    } );
	    popup.add(menuItemPart);
	    // Tabs -> Close (Force)
	    JMenuItem menuItemClose = new JMenuItem("Force Close");
	    menuItemClose.addActionListener(new ActionListener() { 
	      public void actionPerformed(ActionEvent e) { 
	        Component component = getSelectedComponent();
	        if (!(component instanceof ConsolePanel)) {
	          String chan = ((PanelTemplate)component).getWindowName();
	          if (isConnected() && component instanceof ChanPanel) 
	            conn.doPart(chan);
	          closePanel(chan); 
	        }
	      } 
	    } );
	    popup.add(menuItemClose);
	    return popup;
	  }