This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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.