Hi everyone!
I am having trouble with my list selection listener. Every time I select an item in the JList the code for my listener runs twice.
For example, the code snipet like this:
ListSelectionListener listSelectionListener1 = new ListSelectionListener(){
public void valueChanged(ListSelectionEvent listSelectionEvent){
System.out.println("Hello");
}
};
This will print "Hello" twice and I can't figure out why. It is murdering my program. I have another way of getting around it but it is not very efficient and it makes the program much slower due to a special engine I have initiated during runtime. If there is a way to only get the code to execute once I would appreciate any help.
Thanks!
~Chris