⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 securityapp.java

📁 21天学通java的示例程序源代码
💻 JAVA
字号:
//SecurityApp.javapackage com.wrox.security;import java.awt.*;import java.awt.event.*;/** * This class demonstrates the Java security features by attempting to * perform a few privileged operations which only applications may normally * do. This class can be run both as an applet and as an application. */public class SecurityApp extends java.applet.Applet {  private SecurityTestWindow window;  /**   * Called after the applet is loaded into the browser   */  public void init() {    window = new SecurityTestWindow("Applet Security Test");    window.addWindowListener(new WindowAdapter() {      public void windowClosing(WindowEvent e) {        window.hide();      }     });    window.showTestResults();  }   /**   * Called when the page is being closed   */  public void destroy() {    window.dispose();  }   /**   * Main method. This allows the test to be run as a normal application.   */  public static void main(String[] args) {    SecurityTestWindow window =       new SecurityTestWindow("Application Security Test");    window.addWindowListener(new WindowAdapter() {      public void windowClosing(WindowEvent e) {        System.exit(0);      }     });    window.showTestResults();  } }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -