Re: Help Menu - opens frame which does not go to front
- From: Ian Wilson <scobloke2@xxxxxxxxxxxxx>
- Date: Thu, 31 Aug 2006 11:36:02 +0100
Andrew Thompson wrote:
Babu Kalakrishnan wrote:
johnmmcparland wrote:
...
yea a modal dialog will work but it's not the right way to do it. If I
use that then the use cannot make changes to the main window (even if
it had content ;) ) but thanks anyway.
Untested :
Try a non-modal (with a parent specified as your main frame), and try to
call toFront() on it.
The second example actually does that, but now that I look
at it more closely, I note that setVisible(true) is called after
the call to toFront().
The OP might try calling toFront() and requestFocus() *after*
the dialog is visible..
I wonder if SwingUtilities.invokeLater may be of some relevance?
http://forum.java.sun.com/thread.jspa?threadID=666890&messageID=3905383
I use this idiom for a slightly related issue:
SwingUtilities.invokeLater(new Runnable(){
public void run(){
[component].requestFocusInWindow();
}
});
.
- Follow-Ups:
- Re: Help Menu - opens frame which does not go to front
- From: Babu Kalakrishnan
- Re: Help Menu - opens frame which does not go to front
- References:
- Help Menu - opens frame which does not go to front
- From: johnmmcparland
- Re: Help Menu - opens frame which does not go to front
- From: johnmmcparland
- Re: Help Menu - opens frame which does not go to front
- From: Andrew Thompson
- Re: Help Menu - opens frame which does not go to front
- From: johnmmcparland
- Re: Help Menu - opens frame which does not go to front
- From: Babu Kalakrishnan
- Re: Help Menu - opens frame which does not go to front
- From: Andrew Thompson
- Help Menu - opens frame which does not go to front
- Prev by Date: Re: JScrollPane vertical bar is defaulting to the bottom
- Next by Date: Re: Problem with setUndecorated() method in JFrame
- Previous by thread: Re: Help Menu - opens frame which does not go to front
- Next by thread: Re: Help Menu - opens frame which does not go to front
- Index(es):
Relevant Pages
|