Focus on JFrame
From: Michael Kragh Pedersen (m_kragh_pedersen_at_hotmail.com)
Date: 03/26/05
- Next message: aspa: "Re: Image filtering - converting Icons into Images"
- Previous message: Ahmet Aksoy: "How can I select words clicking on them in JEditorPane?"
- Next in thread: Andrey Kuznetsov: "Re: Focus on JFrame"
- Reply: Andrey Kuznetsov: "Re: Focus on JFrame"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 26 Mar 2005 14:14:56 +0100
How does focus work in Java? Is it the last component made, that as
standard gets focus, when your JFrame is painted?
And how can I set focus on my JFrame, instead of as it is now my JButton?
When I write
requestFocusInWindow();
setVisible(true);
nothing happens. My JButton is still in focus, but with
setVisible(true);
requestFocusInWindow();
my JFrame gets focus, but my JButton disappears from the JFrame, until I
click somewhere in the area, where it is. After that, every time, I
close and run my Java program again, the JButton is visible, but has
focus too :(
Anybody who can tell me, what's going on with this?
Michael K. P.
- Next message: aspa: "Re: Image filtering - converting Icons into Images"
- Previous message: Ahmet Aksoy: "How can I select words clicking on them in JEditorPane?"
- Next in thread: Andrey Kuznetsov: "Re: Focus on JFrame"
- Reply: Andrey Kuznetsov: "Re: Focus on JFrame"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]