We have a signed applet that we are using on an HTML page. The applet has lots of popup-windows that, because the applet is signed, do not show the "Java Applet Window" warning at the bottom of the page - so far so good.
However, if the user switches away from the current window, we want to save some values from the applet. To do this, we have the following
This calls into the applet and causes a dialog window to be displayed asking the user if they want to save their settings. But, when this window is displayed, the dreaded "Java Applet Window" warning is displayed at the bottom of the window.
Can some one explain to me how this is happening with a signed applet? I have verified this behaviour with both IE 6.0 and Firefox 1.0.
David Morgan wrote:So, I know this is really really old, but I'm seeing the same problem.
Anyone have any info on this? I haven't been able to find out much about it.
Hmm... I know this is really really really really old, but I have a workaround now. Ugly, yes, but it got rid of the icon.
I created a JDialog first, then called its setVisible() in these locations and FAILED:
1. AccessController.doPrivileged() - checkPermission(new AWTPermission("showWindowWithoutWarningBanner")) didn't even throw exception. Yet I got the icon.
2. AccessControlContext - I saved the instance from applet with AccessController.getContext(), and use it during doPrivileged(). checkPermission still okay and still got icon.
3. SwingUtilities.invokeLater() - Thinking the information may be carried by the current thread, I tried using another thread. Icon again.
At this point I thought it had something to do with when the JDialog was constructed. So for 3. and 4. I moved the JDialog construction code inside - and the background thread method worked. Looks like SwingUtilities carried over the "insecure context" information as well.
So in summary:
1. Create a background thread in applet.
3. Background thread receives the signal, creates the dialog and displays it.
4. Background thread passes the created dialog back to caller, so you can access the created dialog's methods and properties.
Why is the word "abbreviation" so long? And this ad is so short?
a bit of art, as a gift, that will fit in a stocking