ho trovato
il link è >Double-Click Handling
JList doesn't provide any special support for handling double or triple (or n) mouse clicks; however, it's easy to handle them using a MouseListener. Use the JList method locationToIndex() to determine what cell was clicked. For example:
Note that in this example the JList variable is final because it's referred to by the anonymous MouseListener class.codice:final JList list = new JList(dataModel); MouseListener mouseListener = new MouseAdapter() { public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2) { int index = list.locationToIndex(e.getPoint()); System.out.println("Double clicked on Item " + index); } } }; list.addMouseListener(mouseListener);
http://java.sun.com/products/jfc/tsc...t_1/jlist.html
grazie lo stesso ... !!!
e mi funziona :metallica

Rispondi quotando