I wrote an application that generates quiz applets. I could't find a portable way to sign the generated applets automatically so they are not signed. But this simple piece of code as far as I know doesn't require the Applet to be signed, yet it is throwing accessControlException about "accessEventQueue" on linux. I'm running it on IceTea7, OpenJDK7, I tried on both Chrome and Opera.
System.out.println("This will display...");
int r = JOptionPane.showConfirmDialog(null,"End the quiz now?",
"Quiz",
JOptionPane.YES_NO_OPTION,
JOptionPane.INFORMATION_MESSAGE);
System.out.println("This won't...");
Surfing a little I found this info about a bug on IcedTea. I've tried the applet myself on windows and it isn't throwing any Exception there.
If what I've found is really a bug, is there any workaround or I'll have to implement my own confirmation dialog...?
Is there any way to popup a JOptionPane dialog without interfering with the AWT event queue?
As I heard from the developers, it's an actual bug.
Here's my naive implementation of a confirmation dialog to save you some coding time:
And here is the callback it uses: