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

📄 buttonframe.java

📁 Java程序设计(美) David D. Riley著 机械工业出版社 书籍配套 代码
💻 JAVA
字号:
import javax.swing.*;import java.awt.event.*;public class ButtonFrame  extends JFrame implements ActionListener  {    private Timer theTimer;    	/** post:   theTimer == t  */    public ButtonFrame(Timer t)  {    	super("");        setBounds(100, 100, 200, 80);        setVisible(true);        setLayout(null);        JButton btn = new JButton("Start Sunrise");        btn.setBounds(10, 10, 180, 30);        btn.addActionListener(this);        add(btn, 0);        repaint();        theTimer = t;    }	public void actionPerformed( ActionEvent e )   {        theTimer.start( );	}}

⌨️ 快捷键说明

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