• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic