Results 1 to 3 of 3
- 01-21-2012, 05:57 AM #1
Member
- Join Date
- Jan 2012
- Posts
- 14
- Rep Power
- 0
JDialogs opened by JApplet being hidden behind browser in Firefox when focus lost
I've written a fairly extensive JApplet called CalcPlot3D that frequently opens non-modal JDialogs to handle the creation of various objects to be graphed. The normal behavior of JDialogs in Java, as I understand it, is to always stay in front of the parent frame that opened it.
However, in recent versions of Firefox on both the Mac and in Windows Vista and Windows 7, (and most recently in Safari on the Mac), these JDialogs disappear behind the browser window when I click on the main applet (housed in a webpage in the browser). If I open a second JDialog, the other JDialogs will also appear, but all are again hidden when the webpage/browser/main applet get the focus again.
I have come up with two solutions to this, neither of which I am completely satisfied with.
1. When the applet is housed in the browser window, I force all JDialogs to be alwaysOnTop, by setting this property to true. This can be fairly annoying if the user switches to another application, since these JDialogs are still on top and visible wherever the user goes until he/she closes them. But this seems to at least keep the JDialogs around to be useful while using the applet.
2. The other somewhat cleaner solution I have found is to display the applet in a separate JFrame above the browser. See my post on another thread in the Java Applet area of the forum to see how I did this. This takes care of this JDialog focus/disappearing issue, and it also takes care of a few other recent issues that have come up in Firefox on the Mac (the biggest of which I posted a question about last night, that is, the JMenuBar does not function correctly).
Has anyone else observed this behavior with JDialogs in their own JApplets? Does anyone know why this behavior has started on Firefox (and Safari), yet does not show up on IE or in the AppletViewer? Is it really a bug in Firefox? Or is there possibly something I may be doing that is causing my trouble?
Thanks!
Paul
-
Re: JDialogs opened by JApplet being hidden behind browser in Firefox when focus lost
What are you using for the owner of the JDialog when you create it?
- 01-21-2012, 09:53 PM #3
Member
- Join Date
- Jan 2012
- Posts
- 14
- Rep Power
- 0
Re: JDialogs opened by JApplet being hidden behind browser in Firefox when focus lost
Similar Threads
-
JApplet connecting to the database in browser
By pinxrick in forum Java AppletsReplies: 3Last Post: 03-22-2011, 04:12 AM -
java applet on remote site runs in browser, but fails when opened locally
By Albrecht in forum Java AppletsReplies: 8Last Post: 03-10-2011, 07:00 PM -
japplet - jtable - browser
By jasonnuigi in forum Java AppletsReplies: 2Last Post: 12-31-2010, 02:16 PM -
How to check whether a default browser is opened in the operating system?
By stempel1984 in forum Advanced JavaReplies: 6Last Post: 06-07-2010, 03:47 PM -
SWT GUI for Serial Communication - no update if focus is lost
By sharkscream in forum SWT / JFaceReplies: 3Last Post: 09-23-2009, 08:28 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks