This method of the StandardSecurityManager Class determines if classes within the current execution context, based on the call stack of the current thread, are allowed to create top-level windows.
public boolean checkTopLevelWindow(Object window);
Returns false if top-level window creation is allowed and a top-level window requires a warning banner; otherwise, returns true.
window | The top-level window. |
The check succeeds only if all the classes found on the call stack possess UIPermission, and if all those permissions allow the creation of top-level windows. If top-level window creation is not allowed, a SecurityException is thrown.
If top-level window creation is allowed, this check determines whether the top-level window for each calling class requires no warning banner. No warning banner is required if all the UIPermission objects associated with the calling classes specify that no warning banners are necessary.
This method overrides the java.lang.SecurityManager.checkTopLevelWindow method.
SecurityException if the security check fails.