📄 error.java
字号:
import java.awt.BorderLayout;
import java.awt.event.*;
import javax.swing.JLabel;
import javax.swing.*;
public class Error extends JFrame
{
JButton b1=new JButton("点击返回登陆界面");
public Error()
{
super("错误");
this.setBounds(300, 200, 500, 400);
JLabel jl = null;
ImageIcon img = null;
img = new ImageIcon("sorry.jpg");
jl = new JLabel(img);
this.setLayout(new BorderLayout());
this.add(jl, BorderLayout.CENTER);
add("North",b1);
b1.addActionListener(
new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
Denglu denglu=new Denglu();
denglu.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
denglu.setVisible(true);
Error.this.dispose();
}
}
);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -