I am using a JList. I traverse the items in JList using arrow keys. When the selection is on the last item of the list and upon subsequent pressing of down arrow key the selection should change to first item in list. And as such traversal should go on infinitely untill the down arrow key is pressed.
The reversal is applicable for the up arrow button.
To do this I implemented KeyListener but then in keyPressed I am unable to move the focus on the first element of the JList.