I am displaying a JList that contains file names, in a JScrollPane. I want to select files either by clicking on a line, or by using the up and down keys.
Using the mouse works fine, but if I select one line, then click "down" or "up", it skips one entry, and selects the next line but one. I thought maybe the key was bouncing, but there is only one key event per key stroke.
I keep adding traces to the code, but I just can't see my problem!
Do I need to do something with the ListModel
? Help is much appreciated!