aboutusdialog.java
来自「培训时做的学生管理系统.基于J2SE平台开发」· Java 代码 · 共 51 行
JAVA
51 行
package cn.com.dialog;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JPanel;
public class AboutUsDialog {
private JButton tijiao;
private JDialog dialog;
public JDialog CreatAbout() {
if (dialog == null) {
dialog = new JDialog();
dialog.setTitle("关于我们");
dialog.setSize(500, 300);
dialog.setLocationRelativeTo(null);
dialog.setVisible(true);
return dialog;
}
return null;
}
public JPanel CreatSouth() {
JPanel panel = new JPanel();
panel.setLayout(new GridLayout(2,1));
panel.add(new JLabel("",JLabel.CENTER));
panel.add(new JLabel("",JLabel.CENTER));
return panel;
}
public JButton CreatButton() {
if (tijiao == null) {
JButton tijiao = new JButton("提交");
tijiao.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
dialog.dispose();
}
});
return tijiao;
}
return null;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?