Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JList navigation (Selection & Focus)

843804May 13 2005 — edited Mar 23 2007
Hi All,

I'm quite new with Swing.

I have a JList that I can navigate down through with the <Up> and <Down> keys.

I want to change the default behaviour so that the arrowkeys does'nt select the element but only highlights it (i.e. painting the element's border).

So in order to select an element, the element has to be highlighted and then <Space> or <Enter> will select the element.

Any help is appreciated

I't has to be compatible with JDK 1.4.x
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 20 2007
Added on May 13 2005
7 comments
259 views