From fc0854bc0df74df00a2cf4d84af281b7e215d63d Mon Sep 17 00:00:00 2001 From: mlapshin Date: Fri, 18 Apr 2008 18:21:02 +0400 Subject: 6675802: Regression: heavyweight popups cause SecurityExceptions in applets Summary: The problem code in Popup class is surrounded by AccessController.doPrivileged() Reviewed-by: alexp --- src/share/classes/javax/swing/Popup.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/share/classes/javax/swing') diff --git a/src/share/classes/javax/swing/Popup.java b/src/share/classes/javax/swing/Popup.java index 02ab11610..b246b67f4 100644 --- a/src/share/classes/javax/swing/Popup.java +++ b/src/share/classes/javax/swing/Popup.java @@ -229,7 +229,14 @@ public class Popup { // Popups are typically transient and most likely won't benefit // from true double buffering. Turn it off here. getRootPane().setUseTrueDoubleBuffering(false); - setAlwaysOnTop(true); + java.security.AccessController.doPrivileged( + new java.security.PrivilegedAction() { + public Object run() { + setAlwaysOnTop(true); + return null; + } + } + ); } public void update(Graphics g) { -- cgit v1.2.3