tags:

views:

335

answers:

1

hello, how can i make a swing JList to have its items selected with any mousebutton not just the left one?

thanks!

+1  A: 

oh just found the function

   int s = list.locationToIndex(e.getPoint());
   list.setSelectedIndex(s);

when you do this in a mouselistener it does the job.

clamp