I have a textBox and when the An keyevent is done i want my menu to get highligh开发者_运维百科ted So i am looking for event passing from the textfield to the menu. So, is there any way to that ?
Thanks in Advance :)
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.
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
精彩评论