M
Mika Suomi
class AsiakasListaHndl implements ListSelectionListener{
public void valueChanged(ListSelectionEvent e) {
JList jlst= new JList(lstCustomers);
String name=(String) jlst.getSelectedValue();
System.out.println(name);}}
This is code in listener and when I click a customer in list it gives the
result twice.First when I click mouse second when I release mouse.Why???
Mika Suomi
public void valueChanged(ListSelectionEvent e) {
JList jlst= new JList(lstCustomers);
String name=(String) jlst.getSelectedValue();
System.out.println(name);}}
This is code in listener and when I click a customer in list it gives the
result twice.First when I click mouse second when I release mouse.Why???
Mika Suomi