File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes key listeners for dynamically created buttons Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "key listeners for dynamically created buttons" Watch "key listeners for dynamically created buttons" New topic
Author

key listeners for dynamically created buttons

C. Alan
Ranch Hand

Joined: Dec 17, 2004
Posts: 30
I have a radioButton group that has buttons assigned to it dynamically. I need to assign a mnemonic to each key, but I don't see that I can do that dynamically.

I can see how to hardcode it:

Is it possible to do that when we don't know what the button is going to be ahead of time? Or in other words, can we do something like:

Or would that be just too easy.

[ January 27, 2005: Message edited by: C. Alan ]
[ January 27, 2005: Message edited by: C. Alan ]

<a href="http://www.security-forums.com/forum/viewforum.php?f=48" target="_blank" rel="nofollow">Malware Removal</a> - Get your system running like new again.
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

If you look at the javadoc-page: Constant Field Values, you find:


hope that helps.


http://home.arcor.de/hirnstrom/bewerbung
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: key listeners for dynamically created buttons