• Post Reply Bookmark Topic Watch Topic
  • New Topic

Lost the focus from desired component while one use the menu option  RSS feed

 
Atish Khedkar
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
<br><p>
I have multiple Textcomponents (JTextField) in single panel and have "Edit" functionality i.e. "cut", "copy", "past" and "select All" through menubar. For the above mentioned functionality, first, I have to identify my focused component. But when I use "Edit" menu option, the focus has been changed to menu item and I have not get expected focused component.
<br><p>
But when i try to use the above edit functionality from the menubar the focus compenent is menu item and NOT desired focused TextCompenent
<br><p>
I haved use below utility to get focus component
Component component = SwingUtilities.findFocusOwner(this);

Please, kiondly help me out, how could i resolve this prob.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!