aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes static method getFocusedComponent() of JTextComponent Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "static method getFocusedComponent() of JTextComponent" Watch "static method getFocusedComponent() of JTextComponent" New topic
Author

static method getFocusedComponent() of JTextComponent

Jim Martin
Ranch Hand

Joined: Oct 31, 2002
Posts: 80
Hi all
How do I use the static method getFocusedComponent() of JTextComponent. I am using JBuilder 6.0.
I am using the class DefaultFocusManager() and I am trying to used the static method getFocusedComponent() of JTextComponent to get the component the currently has the focus.
What is another way to get the component that has the focus currently?
Thank you very much
Howard Zhao
Greenhorn

Joined: May 06, 2002
Posts: 27
I am not sure whether this is what you are looking for:
KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner()
Howard
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: static method getFocusedComponent() of JTextComponent
 
Similar Threads
Where is a focus?
problem with the chat window
How to send a mouse event to a component where cursor is?
Cut,copy and paste
Focus Lost throws error