Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get selected JScrollPane element?

All I want to do is when user selects one element on the JScrollPane and clicks button, I want to grab this object/element of the JList it holds. How can I do that?

like image 426
lunar Avatar asked Dec 10 '22 04:12

lunar


1 Answers

See JList.getSelectedIndex() or JList.getSelectedValue().

like image 140
Andrew Thompson Avatar answered Dec 11 '22 16:12

Andrew Thompson