This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes adding keyevents to scrollbars Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "adding keyevents to scrollbars" Watch "adding keyevents to scrollbars" New topic
Author

adding keyevents to scrollbars

george justin
Greenhorn

Joined: Jul 31, 2001
Posts: 25
Hi
can anybody help me out in mapping keyevents to scrollbars, the UP,DOWN,LEFT,RIGHT keys as i am not suppose to use mouse on TV applications......
Chantal Ackermann
Ranch Hand

Joined: Sep 28, 2000
Posts: 508
why - does this not work by default?
if not: the component that should listen to the cursor keys must have the focus. attach a keylistener to it. I think this component is rather the component inside the scrollpane than the scrollpane itself (that is if your working with swing).
chantal
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: adding keyevents to scrollbars