wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes FocusListner not working on JMenu Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "FocusListner not working on JMenu" Watch "FocusListner not working on JMenu" New topic
Author

FocusListner not working on JMenu

rohit sen
Greenhorn

Joined: Jan 25, 2010
Posts: 27
Hi

This is my code. I don't see the focus events when the menu is focussed / unfocussed. Am I missing something here? How can I capture focus events on JMenuItem?



Thanks in advance
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> JMenu mItem

is not a JMenuItem
rohit sen
Greenhorn

Joined: Jan 25, 2010
Posts: 27
Doesn't matter if it is a JMenuItem or JMenu. FocusListener doesn't seem to work on both.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
from the Oracle site

"Menu elements do not receive focus since release 1.4."
rohit sen
Greenhorn

Joined: Jan 25, 2010
Posts: 27
Thanks for that information.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: FocusListner not working on JMenu
 
Similar Threads
focus of JPanel
JComboBox and FocusListener
Issues on focus with composites and their child widgets
focusListener wont work on JComboBox
requestFocus() is not working across applications