equal
deleted
inserted
replaced
227 setFocusableWindowState(false); |
227 setFocusableWindowState(false); |
228 setName("###overrideRedirect###"); |
228 setName("###overrideRedirect###"); |
229 // Popups are typically transient and most likely won't benefit |
229 // Popups are typically transient and most likely won't benefit |
230 // from true double buffering. Turn it off here. |
230 // from true double buffering. Turn it off here. |
231 getRootPane().setUseTrueDoubleBuffering(false); |
231 getRootPane().setUseTrueDoubleBuffering(false); |
232 java.security.AccessController.doPrivileged( |
232 // Try to set "always-on-top" for the popup window. |
233 new java.security.PrivilegedAction<Object>() { |
233 // Applets usually don't have sufficient permissions to do it. |
234 public Object run() { |
234 // In this case simply ignore the exception. |
235 setAlwaysOnTop(true); |
235 try { |
236 return null; |
236 setAlwaysOnTop(true); |
237 } |
237 } catch (SecurityException se) { |
238 } |
238 // setAlwaysOnTop is restricted, |
239 ); |
239 // the exception is ignored |
|
240 } |
240 } |
241 } |
241 |
242 |
242 public void update(Graphics g) { |
243 public void update(Graphics g) { |
243 paint(g); |
244 paint(g); |
244 } |
245 } |