📄 appinfosearchall.java
字号:
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
/**
* 职务信息管理模块
* 显示职务全部信息,以供调用者修改或删除
*/
public class AppInfoSearchAll extends JDialog implements ActionListener{
Container contentPane;
String[] s;
//框架的大小
Dimension faceSize = new Dimension(300, 100);
public AppInfoSearchAll(JFrame frame) {
super(frame, true);
this.setResizable(false);
try {
Init();
}
catch (Exception e) {
e.printStackTrace();
}
//设置运行位置,使对话框居中
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
this.setLocation( (int) (screenSize.width - 400) / 2 ,
(int) (screenSize.height - 300) / 2 + 45);
}
private void Init() throws Exception {
this.setSize(faceSize);
contentPane = this.getContentPane();
contentPane.setLayout(new FlowLayout());
CrsBean getId = new CrsBean();
s = getId.getAllId();
searchInfo.addActionListener(this);
}
/**
* 事件处理
*/
public void actionPerformed(ActionEvent e) {
Object obj = e.getSource();
if (obj == searchInfo) { //修改
this.dispose();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -