📄 bton.java
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package bt;import java.awt.FlowLayout;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import javax.swing.JButton;import javax.swing.JFrame;/** * * @author Administrator */public class bton extends JFrame { JButton a1 = new JButton("查询"); JButton a2 = new JButton("添加"); JButton a3=new JButton("退出"); public bton() { super("笔记管理"); setLayout(new FlowLayout()); add(a1); add(a2); add(a3); setSize(300, 200); setVisible(true); a1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { btn2 b2=new btn2(); setVisible(false); } }); a2.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { btn21 b=new btn21(); setVisible(false); } }); a3.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { System.exit(0); } }); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -