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

📄 bounceexpressframe.java~4~

📁 JAVA编写的BounceTest程序 供编程爱好者学习参考之用
💻 JAVA~4~
字号:
package bouncetest;import java.awt.*;import java.awt.event.*;import javax.swing.*;/** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2002</p> * <p>Company: </p> * @author not attributable * @version 1.0 */public class BounceExpressFrame extends JFrame {  JPanel contentPane;  BorderLayout borderLayout1 = new BorderLayout();  JPanel jPanel1 = new JPanel();  JPanel jPanel2 = new JPanel();  JButton Start = new JButton();  JButton Express = new JButton();  JButton Close = new JButton();  //Construct the frame  public BounceExpressFrame() {    enableEvents(AWTEvent.WINDOW_EVENT_MASK);    try {      jbInit();    }    catch(Exception e) {      e.printStackTrace();    }  }  //Component initialization  private void jbInit() throws Exception  {    contentPane = (JPanel) this.getContentPane();    contentPane.setLayout(borderLayout1);    this.setSize(new Dimension(400, 300));    this.setTitle("Bounce !");    Start.setText("Start");    Start.addActionListener(new BounceExpressFrame_Start_actionAdapter(this));    Express.setText("Express");    Close.setText("Close");    contentPane.add(jPanel1, BorderLayout.CENTER);    contentPane.add(jPanel2, BorderLayout.SOUTH);    jPanel2.add(Start, null);    jPanel2.add(Express, null);    jPanel2.add(Close, null);  }  //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);    }  }  void Start_actionPerformed(ActionEvent e) {  }}class BounceExpressFrame_Start_actionAdapter implements java.awt.event.ActionListener {  BounceExpressFrame adaptee;  BounceExpressFrame_Start_actionAdapter(BounceExpressFrame adaptee) {    this.adaptee = adaptee;  }  public void actionPerformed(ActionEvent e) {    adaptee.Start_actionPerformed(e);  }}

⌨️ 快捷键说明

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