System.out.println(e.getButton());
    public void mousePressed(MouseEvent e) {        System.out.println(e.getButton());        if (e.getButton() == MouseEvent.BUTTON2_DOWN_MASK) {            JList list = (JList) e.getSource();            JPopupMenu popup = list.getComponentPopupMenu();                        Point clic = e.getPoint();            int index = list.locationToIndex(clic);            Rectangle r = list.getCellBounds(index, index);            if (r.contains(clic)) {                popup.add(new JMenuItem("salut"));                            }        }    }