File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Two focused window at the same time Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Two focused window at the same time" Watch "Two focused window at the same time" New topic

Two focused window at the same time

William Wang

Joined: Jan 19, 2004
Posts: 2
In my project, I have a server running at localhost, javascript will send a request to localhost server which will open a Dialog window. The problem is I want the new Dialog window to get the focus, but what it happened is both browser (firefox) and dialog get the focus at the same time. I say that because both window's title bar is in clear blue. If I click the Dialog, then firefox lose focus, i.e. the title bar becomes gray. Is there a way to ask other windows on the platform to lose focus?

After experimenting more, looks like the problem is that dialog didn't get focus at all, but I used setAlwaysOnTop(), so it appeared to be focused.

Thanks for any suggestions.
I agree. Here's the link:
subject: Two focused window at the same time
jQuery in Action, 3rd edition