Reputation: 565
I have a textBox and when the An keyevent is done i want my menu to get highlighted So i am looking for event passing from the textfield to the menu. So, is there any way to that ?
Thanks in Advance :)
Upvotes: 0
Views: 99
Reputation: 9293
maybe it's "bad way", but try to make your menu class, extending old one, and add there some public method (with your highlighting logic) invoked by action listener in text filed
Upvotes: 0
Reputation: 7779
You can add a KeyListener to the textBox, and in keyPressed method you can implement the logic to manipulate the menu based on the criteria.
Upvotes: 2