I’m using Netbeans to create a JList and an event listener.
I want to retrieve the object the user selected, when it’s selected.
So far I’ve got this:
private void listKurserValueChanged(javax.swing.event.ListSelectionEvent evt) {
System.out.println("" + ((listKurser)evt.getSource()));
}
However, I’m getting “cannot find symbol” at listKurser, which is the JList.
What is wrong?
Try