Re: Help Menu - opens frame which does not go to front



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();
}
});
.



Relevant Pages

  • Re: Opera with Java?
    ... On Sun, 8 Aug 2004, Andrew Thompson wrote: ... > I have an applet that shows problems in ... window, but after a bit of scrolling it popped back to full window. ... if this is uniquely an opera problem i might ...
    (comp.lang.java.programmer)
  • Re: How to check if class exists?
    ... Andrew Thompson wrote: ... > | In my main window I set up certain things based on the ... > | availability of certain classes in my system. ... > | executes static initializers and so on. ...
    (comp.lang.java.programmer)
  • Re: How to check if class exists?
    ... |> | In my main window I set up certain things based on the ... Andrew Thompson ...
    (comp.lang.java.programmer)
  • Re: Listener for opening Windows
    ... That example works for the first* time a Window ... This entire design smells fishy to me. ... Andrew Thompson ... Then, what is "opening". ...
    (comp.lang.java.gui)
  • Re: I cannot see applets in IE 6
    ... "Andrew Thompson" wrote in message ... > 'oldjava.jsp' in a new window. ... > applet tag without the 'target' parameter, ... BTW, I use M. Gallant's utility to hot-swap JVMs without restarting the ...
    (comp.lang.java.programmer)