Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #6892
| From | wee <rbulseco@gmail.com> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | event listener (how to) |
| Date | 2011-08-08 19:16 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <e509c046-a524-4a27-ab4f-b6291ff1f331@glegroupsg2000goo.googlegroups.com> (permalink) |
hello, i added an actionListener to a JButton. it works well when i click it with a mouse. if i put the focus on the button using the tab key and press the keyboard enter key, nothing happens. my question then is, how can i make the JButton react to both mouse click and the keyboard enter key? do i need to add a keypressed listener on top of the actionListener? any help would be appreciated. thank you.
Back to comp.lang.java.programmer | Previous | Next — Next in thread | Find similar
event listener (how to) wee <rbulseco@gmail.com> - 2011-08-08 19:16 -0700 Re: event listener (how to) markspace <-@.> - 2011-08-08 20:06 -0700 Re: event listener (how to) Knute Johnson <september@knutejohnson.com> - 2011-08-08 21:27 -0700
csiph-web