📄 aboutours.java
字号:
/**
* 源文件:AboutOurs.java
* 作用:关于我们介绍
*/
package mypro;
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class AboutOurs extends JDialog implements ActionListener
{
private JLabel labImage;
private JButton btnSure;
private JPanel southPanel;
public AboutOurs(MainFrame owner,boolean bo)
{
super(owner,bo);
labImage=new JLabel();
ImageIcon image=new ImageIcon("..\\S1GraduationDevice\\image\\about.jpg");
// 插入图片
labImage.setIcon(image);
southPanel=new JPanel();
btnSure=new JButton("确定");
btnSure.addActionListener(this);
Container me=this.getContentPane();
me.add(labImage,BorderLayout.CENTER);
me.add(southPanel,BorderLayout.SOUTH);
southPanel.add(btnSure);
this.setTitle("关于我们");
this.setSize(400,377);
this.setLocationRelativeTo(this);
this.setResizable(false);
this.setVisible(true);
}
/*关闭该窗口*/
public void actionPerformed(ActionEvent bae)
{
this.dispose();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -