WORK AROUND
There is no a good workaround. However, you can grant the needed permission by signing your applet or modifying local security policies.
|
|
|
SUGGESTED FIX
webrevs: http://sa.sfbay.sun.com/projects/swing_data/7/6675802/
test: test/javax/swing/JPopupMenu/6675802/bug6675802.java
---
src/share/classes/javax/swing/Popup.java
*** 227,238 ****
--- 227,245 ----
setFocusableWindowState(false);
setName("###overrideRedirect###");
// Popups are typically transient and most likely won't benefit
// from true double buffering. Turn it off here.
getRootPane().setUseTrueDoubleBuffering(false);
+ java.security.AccessController.doPrivileged(
+ new java.security.PrivilegedAction<Object>() {
+ public Object run() {
setAlwaysOnTop(true);
+ return null;
}
+ }
+ );
+ }
public void update(Graphics g) {
paint(g);
}
|
|
|
EVALUATION
Thanks to ###@###.###, who has already wrote that the problem is in the Popup class. Wrapping setAlwaysOnTop(true) in AccessController.doPrivileged() solves the problem.
|
|
|
EVALUATION
I reproduced the bug. Certainly, it is a regression of 6580930.
|
|
|
SUGGESTED FIX
Use AccessController.doPrivileged() around the call to setAlwaysOnTop(true), if this is appropriate and isn't a security risk.
|
|
|