// Attempt to stop the window from displaying
if (perm instanceof java.awt.AWTPermission) {
final String message = "Preventing " + robotProxy.getStatics().getName() + " from access: " + perm;
robotProxy.punishSecurityViolation(message);
// this is hack, because security exception is not enough
throw new ThreadDeath();
}