@Override
	public void mouseClicked(MouseEvent e) {
		//System.out.println(e.isPopupTrigger()); // never works
		if (e.getButton() == MouseEvent.BUTTON3 && tab.getSelectedValue() != null) {
			JPopupMenu menu = new JPopupMenu();

			for (int i = 0; i < tabs.size(); i++) {
				final JList destination = tabs.get(i);
				JMenuItem item = new JMenuItem("Move to Tab " + i);
				item.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent e) {
						gui.moveToTab(tab, destination);
					}
				});
				if (index == i) {
					item.setEnabled(false);
				}
				menu.add(item);
			}

			menu.show(tab, e.getX(), e.getY());
		}
	}