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

📄 quryapplet.java~1~

📁 大量java源程序
💻 JAVA~1~
字号:
package javaservlets.tunnel;import java.awt.*;import java.awt.event.*;import java.applet.*;import com.borland.jbcl.layout.*;/** * Title: * Description: * Copyright:    Copyright (c) 2002 * Company: * @author * @version 1.0 */public class quryApplet extends Applet {  boolean isStandalone = false;  BorderLayout borderLayout1 = new BorderLayout();  Panel panel1 = new Panel();  Button button1 = new Button();  ScrollPane scrollPane1 = new ScrollPane();  TextArea textArea1 = new TextArea();  /**Get a parameter value*/  public String getParameter(String key, String def) {    return isStandalone ? System.getProperty(key, def) :      (getParameter(key) != null ? getParameter(key) : def);  }  /**Construct the applet*/  public quryApplet() {  }  /**Initialize the applet*/  public void init() {    try {      jbInit();    }    catch(Exception e) {      e.printStackTrace();    }  }  /**Component initialization*/  private void jbInit() throws Exception {    this.setLayout(borderLayout1);    button1.setLabel("qurey");    textArea1.setText("textArea1");    this.add(panel1, BorderLayout.NORTH);    panel1.add(button1, null);    this.add(scrollPane1, BorderLayout.CENTER);    scrollPane1.add(textArea1, null);  }  /**Start the applet*/  public void start() {  }  /**Stop the applet*/  public void stop() {  }  /**Destroy the applet*/  public void destroy() {  }  /**Get Applet information*/  public String getAppletInfo() {    return "Applet Information";  }  /**Get parameter info*/  public String[][] getParameterInfo() {    return null;  }  /**Main method*/  public static void main(String[] args) {    quryApplet applet = new quryApplet();    applet.isStandalone = true;    Frame frame;    frame = new Frame() {      protected void processWindowEvent(WindowEvent e) {        super.processWindowEvent(e);        if (e.getID() == WindowEvent.WINDOW_CLOSING) {          System.exit(0);        }      }      public synchronized void setTitle(String title) {        super.setTitle(title);        enableEvents(AWTEvent.WINDOW_EVENT_MASK);      }    };    frame.setTitle("Applet Frame");    frame.add(applet, BorderLayout.CENTER);    applet.init();    applet.start();    frame.setSize(400,320);    Dimension d = Toolkit.getDefaultToolkit().getScreenSize();    frame.setLocation((d.width - frame.getSize().width) / 2, (d.height - frame.getSize().height) / 2);    frame.setVisible(true);  }}

⌨️ 快捷键说明

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