문제

I was wondering how I were to do if I wanted to retrieve the chosen answer from a java scroll list (JScrollPane), and then display it in a JOptionPane.showMessageDialog? For example I would use gettext() if I wanted to get it from a textarea/box, but how do I retrieve the answer from a java scroll list?

Thanks.

도움이 되었습니까?

해결책

Have you tried using getSelectedValuesList() which returns a list of all selected items.

Documentation

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top