📄 drive.java
字号:
package huazheng;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
public class Drive {
public void huazheng(){
JFrame frame=new JFrame("操作");
final JButton j1,j2,j3,j4;
j1=new JButton("查找");
j2=new JButton("添加");
j3=new JButton("删除");
j4=new JButton("退出");
frame.setSize(200,200);
frame.setLocation(300,300);
frame.setAlwaysOnTop(true);
// frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setResizable(false);
frame.setLayout(null);
frame.add(j1);
frame.add(j2);
frame.add(j3);
frame.add(j4);
j1.setBounds(10,20,60,30);
j2.setBounds(90,20,60,30);
j3.setBounds(10,70,60,30);
j4.setBounds(90,70,60,30);
j4.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
if(e.getSource()==j4)
System.exit(0);
}
});
j1.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
new Find().find();
}
});
j2.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
Mangament m = new Mangament();
m.Welcome();
}
});
j3.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
}
});
frame.setVisible(true);
}
public static void main(String[] args) {
new Drive().huazheng();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -