java.awt.AWTPermission Java Examples
The following examples show how to use
java.awt.AWTPermission.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PluginSandboxPolicy.java From rapidminer-studio with GNU Affero General Public License v3.0 | 6 votes |
/** * Adds a couple of common permissions for both unsigned extensions as well as Groovy scripts. * * @param permissions * the permissions object which will get the permissions added to it */ private static void addCommonPermissions(Permissions permissions) { permissions.add(new AudioPermission("play")); permissions.add(new AWTPermission("listenToAllAWTEvents")); permissions.add(new AWTPermission("setWindowAlwaysOnTop")); permissions.add(new AWTPermission("showWindowWithoutWarningBanner")); permissions.add(new AWTPermission("watchMousePointer")); permissions.add(new LoggingPermission("control", "")); permissions.add(new SocketPermission("*", "connect, listen, accept, resolve")); permissions.add(new URLPermission("http://-", "*:*")); permissions.add(new URLPermission("https://-", "*:*")); // because random Java library calls use sun classes which may or may not do an acess check, // we have to grant access to all of them // this is a very unfortunate permission and I would love to not have it // so if at any point in the future this won't be necessary any longer, remove it!!! permissions.add(new RuntimePermission("accessClassInPackage.sun.*")); permissions.add(new RuntimePermission("accessDeclaredMembers")); permissions.add(new RuntimePermission("getenv.*")); permissions.add(new RuntimePermission("getFileSystemAttributes")); permissions.add(new RuntimePermission("readFileDescriptor")); permissions.add(new RuntimePermission("writeFileDescriptor")); permissions.add(new RuntimePermission("queuePrintJob")); permissions.add(new NetPermission("specifyStreamHandler")); }
Example #2
Source File: Permissions.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) { MySecurityManager sm = MySecurityManager.install(); Toolkit toolkit = Toolkit.getDefaultToolkit(); sm.prepare("Toolkit.getSystemClipboard()"); toolkit.getSystemClipboard(); sm.assertChecked(AWTPermission.class, "accessClipboard"); sm.prepare("Toolkit.getSystemEventQueue()"); toolkit.getSystemEventQueue(); sm.assertChecked(AWTPermission.class, "accessEventQueue"); sm.prepare("Toolkit.getSystemSelection()"); toolkit.getSystemSelection(); //sm.assertChecked(AWTPermission.class, "accessClipboard"); sm.prepare("Window(Frame)"); new Window((Frame)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); sm.prepare("Window(Window)"); new Window((Window)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); sm.prepare("Window(Window,GraphicsConfiguration)"); new Window((Window)null, (GraphicsConfiguration)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); }
Example #3
Source File: Permissions.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) { MySecurityManager sm = MySecurityManager.install(); Toolkit toolkit = Toolkit.getDefaultToolkit(); sm.prepare("Toolkit.getSystemClipboard()"); toolkit.getSystemClipboard(); sm.assertChecked(AWTPermission.class, "accessClipboard"); sm.prepare("Toolkit.getSystemEventQueue()"); toolkit.getSystemEventQueue(); sm.assertChecked(AWTPermission.class, "accessEventQueue"); sm.prepare("Toolkit.getSystemSelection()"); toolkit.getSystemSelection(); //sm.assertChecked(AWTPermission.class, "accessClipboard"); sm.prepare("Window(Frame)"); new Window((Frame)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); sm.prepare("Window(Window)"); new Window((Window)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); sm.prepare("Window(Window,GraphicsConfiguration)"); new Window((Window)null, (GraphicsConfiguration)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); }
Example #4
Source File: Desktop.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
/** * Calls to the security manager's <code>checkPermission</code> method with * an <code>AWTPermission("showWindowWithoutWarningBanner")</code> * permission. */ private void checkAWTPermission(){ SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new AWTPermission( "showWindowWithoutWarningBanner")); } }
Example #5
Source File: Desktop.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
/** * Calls to the security manager's <code>checkPermission</code> method with * an <code>AWTPermission("showWindowWithoutWarningBanner")</code> * permission. */ private void checkAWTPermission(){ SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new AWTPermission( "showWindowWithoutWarningBanner")); } }
Example #6
Source File: Desktop.java From Java8CN with Apache License 2.0 | 5 votes |
/** * Calls to the security manager's <code>checkPermission</code> method with * an <code>AWTPermission("showWindowWithoutWarningBanner")</code> * permission. */ private void checkAWTPermission(){ SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new AWTPermission( "showWindowWithoutWarningBanner")); } }
Example #7
Source File: Desktop.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Calls to the security manager's <code>checkPermission</code> method with * an <code>AWTPermission("showWindowWithoutWarningBanner")</code> * permission. */ private void checkAWTPermission(){ SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new AWTPermission( "showWindowWithoutWarningBanner")); } }
Example #8
Source File: Permissions.java From hottub with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) { MySecurityManager sm = MySecurityManager.install(); Toolkit toolkit = Toolkit.getDefaultToolkit(); sm.prepare("Toolkit.getSystemClipboard()"); toolkit.getSystemClipboard(); sm.assertChecked(AWTPermission.class, "accessClipboard"); sm.prepare("Toolkit.getSystemEventQueue()"); toolkit.getSystemEventQueue(); sm.assertChecked(AWTPermission.class, "accessEventQueue"); sm.prepare("Toolkit.getSystemSelection()"); toolkit.getSystemSelection(); //sm.assertChecked(AWTPermission.class, "accessClipboard"); sm.prepare("Window(Frame)"); new Window((Frame)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); sm.prepare("Window(Window)"); new Window((Window)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); sm.prepare("Window(Window,GraphicsConfiguration)"); new Window((Window)null, (GraphicsConfiguration)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); }
Example #9
Source File: Desktop.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Calls to the security manager's <code>checkPermission</code> method with * an <code>AWTPermission("showWindowWithoutWarningBanner")</code> * permission. */ private void checkAWTPermission(){ SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new AWTPermission( "showWindowWithoutWarningBanner")); } }
Example #10
Source File: Permissions.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) { MySecurityManager sm = MySecurityManager.install(); Toolkit toolkit = Toolkit.getDefaultToolkit(); sm.prepare("Toolkit.getSystemClipboard()"); toolkit.getSystemClipboard(); sm.assertChecked(AWTPermission.class, "accessClipboard"); sm.prepare("Toolkit.getSystemEventQueue()"); toolkit.getSystemEventQueue(); sm.assertChecked(AWTPermission.class, "accessEventQueue"); sm.prepare("Toolkit.getSystemSelection()"); toolkit.getSystemSelection(); //sm.assertChecked(AWTPermission.class, "accessClipboard"); sm.prepare("Window(Frame)"); new Window((Frame)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); sm.prepare("Window(Window)"); new Window((Window)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); sm.prepare("Window(Window,GraphicsConfiguration)"); new Window((Window)null, (GraphicsConfiguration)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); }
Example #11
Source File: Desktop.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Calls to the security manager's <code>checkPermission</code> method with * an <code>AWTPermission("showWindowWithoutWarningBanner")</code> * permission. */ private void checkAWTPermission(){ SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new AWTPermission( "showWindowWithoutWarningBanner")); } }
Example #12
Source File: Permissions.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) { MySecurityManager sm = MySecurityManager.install(); Toolkit toolkit = Toolkit.getDefaultToolkit(); sm.prepare("Toolkit.getSystemClipboard()"); toolkit.getSystemClipboard(); sm.assertChecked(AWTPermission.class, "accessClipboard"); sm.prepare("Toolkit.getSystemEventQueue()"); toolkit.getSystemEventQueue(); sm.assertChecked(AWTPermission.class, "accessEventQueue"); sm.prepare("Toolkit.getSystemSelection()"); toolkit.getSystemSelection(); //sm.assertChecked(AWTPermission.class, "accessClipboard"); sm.prepare("Window(Frame)"); new Window((Frame)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); sm.prepare("Window(Window)"); new Window((Window)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); sm.prepare("Window(Window,GraphicsConfiguration)"); new Window((Window)null, (GraphicsConfiguration)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); }
Example #13
Source File: Desktop.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
/** * Calls to the security manager's <code>checkPermission</code> method with * an <code>AWTPermission("showWindowWithoutWarningBanner")</code> * permission. */ private void checkAWTPermission(){ SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new AWTPermission( "showWindowWithoutWarningBanner")); } }
Example #14
Source File: Permissions.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) { MySecurityManager sm = MySecurityManager.install(); Toolkit toolkit = Toolkit.getDefaultToolkit(); sm.prepare("Toolkit.getSystemClipboard()"); toolkit.getSystemClipboard(); sm.assertChecked(AWTPermission.class, "accessClipboard"); sm.prepare("Toolkit.getSystemEventQueue()"); toolkit.getSystemEventQueue(); sm.assertChecked(AWTPermission.class, "accessEventQueue"); sm.prepare("Toolkit.getSystemSelection()"); toolkit.getSystemSelection(); //sm.assertChecked(AWTPermission.class, "accessClipboard"); sm.prepare("Window(Frame)"); new Window((Frame)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); sm.prepare("Window(Window)"); new Window((Window)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); sm.prepare("Window(Window,GraphicsConfiguration)"); new Window((Window)null, (GraphicsConfiguration)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); }
Example #15
Source File: Desktop.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
/** * Calls to the security manager's <code>checkPermission</code> method with * an <code>AWTPermission("showWindowWithoutWarningBanner")</code> * permission. */ private void checkAWTPermission(){ SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new AWTPermission( "showWindowWithoutWarningBanner")); } }
Example #16
Source File: Permissions.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) { MySecurityManager sm = MySecurityManager.install(); Toolkit toolkit = Toolkit.getDefaultToolkit(); sm.prepare("Toolkit.getSystemClipboard()"); toolkit.getSystemClipboard(); sm.assertChecked(AWTPermission.class, "accessClipboard"); sm.prepare("Toolkit.getSystemEventQueue()"); toolkit.getSystemEventQueue(); sm.assertChecked(AWTPermission.class, "accessEventQueue"); sm.prepare("Toolkit.getSystemSelection()"); toolkit.getSystemSelection(); //sm.assertChecked(AWTPermission.class, "accessClipboard"); sm.prepare("Window(Frame)"); new Window((Frame)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); sm.prepare("Window(Window)"); new Window((Window)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); sm.prepare("Window(Window,GraphicsConfiguration)"); new Window((Window)null, (GraphicsConfiguration)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); }
Example #17
Source File: Desktop.java From jdk-1.7-annotated with Apache License 2.0 | 5 votes |
/** * Calls to the security manager's <code>checkPermission</code> method with * an <code>AWTPermission("showWindowWithoutWarningBanner")</code> * permission. */ private void checkAWTPermission(){ SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new AWTPermission( "showWindowWithoutWarningBanner")); } }
Example #18
Source File: Desktop.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
/** * Calls to the security manager's <code>checkPermission</code> method with * an <code>AWTPermission("showWindowWithoutWarningBanner")</code> * permission. */ private void checkAWTPermission(){ SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new AWTPermission( "showWindowWithoutWarningBanner")); } }
Example #19
Source File: Permissions.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) { MySecurityManager sm = MySecurityManager.install(); Toolkit toolkit = Toolkit.getDefaultToolkit(); sm.prepare("Toolkit.getSystemClipboard()"); toolkit.getSystemClipboard(); sm.assertChecked(AWTPermission.class, "accessClipboard"); sm.prepare("Toolkit.getSystemEventQueue()"); toolkit.getSystemEventQueue(); sm.assertChecked(AWTPermission.class, "accessEventQueue"); sm.prepare("Toolkit.getSystemSelection()"); toolkit.getSystemSelection(); //sm.assertChecked(AWTPermission.class, "accessClipboard"); sm.prepare("Window(Frame)"); new Window((Frame)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); sm.prepare("Window(Window)"); new Window((Window)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); sm.prepare("Window(Window,GraphicsConfiguration)"); new Window((Window)null, (GraphicsConfiguration)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); }
Example #20
Source File: Permissions.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) { MySecurityManager sm = MySecurityManager.install(); Toolkit toolkit = Toolkit.getDefaultToolkit(); sm.prepare("Toolkit.getSystemClipboard()"); toolkit.getSystemClipboard(); sm.assertChecked(AWTPermission.class, "accessClipboard"); sm.prepare("Toolkit.getSystemEventQueue()"); toolkit.getSystemEventQueue(); sm.assertChecked(AWTPermission.class, "accessEventQueue"); sm.prepare("Toolkit.getSystemSelection()"); toolkit.getSystemSelection(); //sm.assertChecked(AWTPermission.class, "accessClipboard"); sm.prepare("Window(Frame)"); new Window((Frame)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); sm.prepare("Window(Window)"); new Window((Window)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); sm.prepare("Window(Window,GraphicsConfiguration)"); new Window((Window)null, (GraphicsConfiguration)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); }
Example #21
Source File: Desktop.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
/** * Calls to the security manager's <code>checkPermission</code> method with * an <code>AWTPermission("showWindowWithoutWarningBanner")</code> * permission. */ private void checkAWTPermission(){ SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new AWTPermission( "showWindowWithoutWarningBanner")); } }
Example #22
Source File: Permissions.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) { MySecurityManager sm = MySecurityManager.install(); Toolkit toolkit = Toolkit.getDefaultToolkit(); sm.prepare("Toolkit.getSystemClipboard()"); toolkit.getSystemClipboard(); sm.assertChecked(AWTPermission.class, "accessClipboard"); sm.prepare("Toolkit.getSystemEventQueue()"); toolkit.getSystemEventQueue(); sm.assertChecked(AWTPermission.class, "accessEventQueue"); sm.prepare("Toolkit.getSystemSelection()"); toolkit.getSystemSelection(); //sm.assertChecked(AWTPermission.class, "accessClipboard"); sm.prepare("Window(Frame)"); new Window((Frame)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); sm.prepare("Window(Window)"); new Window((Window)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); sm.prepare("Window(Window,GraphicsConfiguration)"); new Window((Window)null, (GraphicsConfiguration)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); }
Example #23
Source File: Desktop.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Calls to the security manager's <code>checkPermission</code> method with * an <code>AWTPermission("showWindowWithoutWarningBanner")</code> * permission. */ private void checkAWTPermission(){ SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new AWTPermission( "showWindowWithoutWarningBanner")); } }
Example #24
Source File: Permissions.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) { MySecurityManager sm = MySecurityManager.install(); Toolkit toolkit = Toolkit.getDefaultToolkit(); sm.prepare("Toolkit.getSystemClipboard()"); toolkit.getSystemClipboard(); sm.assertChecked(AWTPermission.class, "accessClipboard"); sm.prepare("Toolkit.getSystemEventQueue()"); toolkit.getSystemEventQueue(); sm.assertChecked(AWTPermission.class, "accessEventQueue"); sm.prepare("Toolkit.getSystemSelection()"); toolkit.getSystemSelection(); //sm.assertChecked(AWTPermission.class, "accessClipboard"); sm.prepare("Window(Frame)"); new Window((Frame)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); sm.prepare("Window(Window)"); new Window((Window)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); sm.prepare("Window(Window,GraphicsConfiguration)"); new Window((Window)null, (GraphicsConfiguration)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); }
Example #25
Source File: Desktop.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Calls to the security manager's <code>checkPermission</code> method with * an <code>AWTPermission("showWindowWithoutWarningBanner")</code> * permission. */ private void checkAWTPermission(){ SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new AWTPermission( "showWindowWithoutWarningBanner")); } }
Example #26
Source File: Permissions.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) { MySecurityManager sm = MySecurityManager.install(); Toolkit toolkit = Toolkit.getDefaultToolkit(); sm.prepare("Toolkit.getSystemClipboard()"); toolkit.getSystemClipboard(); sm.assertChecked(AWTPermission.class, "accessClipboard"); sm.prepare("Toolkit.getSystemEventQueue()"); toolkit.getSystemEventQueue(); sm.assertChecked(AWTPermission.class, "accessEventQueue"); sm.prepare("Toolkit.getSystemSelection()"); toolkit.getSystemSelection(); //sm.assertChecked(AWTPermission.class, "accessClipboard"); sm.prepare("Window(Frame)"); new Window((Frame)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); sm.prepare("Window(Window)"); new Window((Window)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); sm.prepare("Window(Window,GraphicsConfiguration)"); new Window((Window)null, (GraphicsConfiguration)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); }
Example #27
Source File: Desktop.java From JDKSourceCode1.8 with MIT License | 5 votes |
/** * Calls to the security manager's <code>checkPermission</code> method with * an <code>AWTPermission("showWindowWithoutWarningBanner")</code> * permission. */ private void checkAWTPermission(){ SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new AWTPermission( "showWindowWithoutWarningBanner")); } }
Example #28
Source File: Desktop.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Calls to the security manager's <code>checkPermission</code> method with * an <code>AWTPermission("showWindowWithoutWarningBanner")</code> * permission. */ private void checkAWTPermission(){ SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new AWTPermission( "showWindowWithoutWarningBanner")); } }
Example #29
Source File: Permissions.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public static void main(String[] args) { MySecurityManager sm = MySecurityManager.install(); Toolkit toolkit = Toolkit.getDefaultToolkit(); sm.prepare("Toolkit.getSystemClipboard()"); toolkit.getSystemClipboard(); sm.assertChecked(AWTPermission.class, "accessClipboard"); sm.prepare("Toolkit.getSystemEventQueue()"); toolkit.getSystemEventQueue(); sm.assertChecked(AWTPermission.class, "accessEventQueue"); sm.prepare("Toolkit.getSystemSelection()"); toolkit.getSystemSelection(); //sm.assertChecked(AWTPermission.class, "accessClipboard"); sm.prepare("Window(Frame)"); new Window((Frame)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); sm.prepare("Window(Window)"); new Window((Window)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); sm.prepare("Window(Window,GraphicsConfiguration)"); new Window((Window)null, (GraphicsConfiguration)null); sm.assertChecked(AWTPermission.class, "showWindowWithoutWarningBanner"); }
Example #30
Source File: Desktop.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Calls to the security manager's <code>checkPermission</code> method with * an <code>AWTPermission("showWindowWithoutWarningBanner")</code> * permission. */ private void checkAWTPermission(){ SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new AWTPermission( "showWindowWithoutWarningBanner")); } }