That was actually a pretty good design direction: get the code out of the event handlers into nicely named methods that tell you what they do in response to the event. One event simulating another just doesn't sit well with me as a design. Two widgets - a button and a menu - doing the same thing sounds much better.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Maybe I can help out on this one..if I am wrong, someone will tell me, and then we both learn.If I am understanding you correctly, you are trying to assign multiple events to a single action?
I usually don't get to offer help, but here goes...
What I have here is an actione being created, and a Jbutton associated with it, as well as a mnemonic key. By either clicking on the button, or pressing ALT-c, I trigger the event. I would guess that you could add the same event to other actions also. [ February 08, 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.
Joined: Jan 29, 2003
Did that compile and do what you wanted? Of course you can tell I'm guessing "no" but give it a try and see what it does!
Joined: Dec 17, 2004
My code? No, that won't compile all by itself. It needs other things, you know, like a main method, constructor, etc. However, inside my class, it works perfectly.
Should I have presented it as a complete method? [ February 09, 2005: Message edited by: C. Alan ]
Originally posted by fernando mendez: hi. did u know another way to do it?
There are always more than one way to solve a problem, especially when it comes to computer programming. I believe the above suggestions are all bassed on pretty good design principles. If you don't like these ideas, what suggestions do you have for doing it differently?