JTabbedPane - Cant remove individual tabs
===

I have a simple `JTabbedPane` that shows text files. Each tab contains a `JList` wrapped in a `JScrollPane` I would like to be able to close the individual tabs with a right click, but I can't get this seemingly simple behavior to work.

Here is what I've tried so far:

**Adding a listener to the Pane**

    public class RightClickListener extends MouseAdapter {
        public void mouseClicked(MouseEvent e) {
            if (SwingUtilities.isRightMouseButton(e)) { 
                remove(getComponentAt(e.getPoint()));
            }
        }
    }

**Adding to the individual tabs**

	public class RightClickListener extends MouseAdapter {
		public void mouseClicked(MouseEvent e) {
	        if (SwingUtilities.isRightMouseButton(e)) { 
	        	remove((Component) e.getSource());
	        }
	    }
	}

I've tried several other variations, and nothing seems to work. Does anyone know why these components aren't being removed? I'd be happy to provide any additional details as necessary.