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

📄 frame1.java~2~

📁 方面
💻 JAVA~2~
字号:
package listdelete;import java.awt.*;import java.awt.event.*;import javax.swing.*;import com.borland.jbcl.layout.*;/** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2002</p> * <p>Company: </p> * @author unascribed * @version 1.0 */public class Frame1 extends JFrame {  JPanel contentPane;  XYLayout xYLayout1 = new XYLayout();  List list1 = new List();  Button button1 = new Button();  //Construct the frame  public Frame1() {    enableEvents(AWTEvent.WINDOW_EVENT_MASK);    try {    list1Init()      jbInit();    }    catch(Exception e) {      e.printStackTrace();    }  }  //Component initialization  private void jbInit() throws Exception  {    //setIconImage(Toolkit.getDefaultToolkit().createImage(Frame1.class.getResource("[Your Icon]")));    contentPane = (JPanel) this.getContentPane();    contentPane.setLayout(xYLayout1);    this.setSize(new Dimension(400, 300));    this.setTitle("Frame Title");    button1.setLabel("Delete");    button1.addActionListener(new java.awt.event.ActionListener() {      public void actionPerformed(ActionEvent e) {        button1_actionPerformed(e);      }    });    contentPane.add(list1,  new XYConstraints(46, 24, 138, 161));    contentPane.add(button1,  new XYConstraints(215, 45, 115, 40));  }  //Overridden so we can exit when window is closed  protected void processWindowEvent(WindowEvent e) {    super.processWindowEvent(e);    if (e.getID() == WindowEvent.WINDOW_CLOSING) {      System.exit(0);    }  }  public  void list1Init()  throws Exception  {    list1.add("Java thinking");    list1.add("VC++ thinking");    list1.add("C++  thinking");    list1.add("计算机英语");    list1.add(" C language");    list1.add("操作系统");    list1.add("汇编语言");    list1.add("编译原理");    list1.add("数字逻辑");    list1.add("MFC编程");    list1.add("系统结构");    list1.add("数值分析");    list1.add("大学英语");    list1.add("大学德育");    list1.add("思想教育");    list1.add("财政学");}  void button1_actionPerformed(ActionEvent e) {  }}

⌨️ 快捷键说明

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