📄 tishi.java~3~
字号:
package MainFrame;
import java.awt.*;
import javax.swing.*;
import com.borland.jbcl.layout.XYLayout;
import com.borland.jbcl.layout.*;
import java.awt.Font;
import java.awt.event.WindowEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class TiShi extends JFrame {
XYLayout xYLayout1 = new XYLayout();
JLabel jLabel1 = new JLabel();
JLabel jLabel2 = new JLabel();
JLabel jLabel3 = new JLabel();
JLabel jLabel4 = new JLabel();
JButton jButton1 = new JButton();
JButton jButton2 = new JButton();
public TiShi() {
try {
jbInit();
} catch (Exception exception) {
exception.printStackTrace();
}
}
private void jbInit() throws Exception {
getContentPane().setLayout(xYLayout1);
jLabel1.setFont(new java.awt.Font("宋体", Font.BOLD, 20));
jLabel1.setForeground(Color.red);
jLabel1.setText("热心提示");
jLabel2.setFont(new java.awt.Font("宋体", Font.BOLD, 18));
jLabel2.setText("尊敬的用户:");
jLabel3.setFont(new java.awt.Font("宋体", Font.BOLD, 15));
jLabel3.setText("请您妥善保管好您的卡号和密码");
jLabel4.setFont(new java.awt.Font("宋体", Font.BOLD, 15));
jLabel4.setText("欢迎您的使用");
jButton1.setFont(new java.awt.Font("宋体", Font.BOLD, 18));
jButton1.setText("继续");
jButton1.addActionListener(new TiShi_jButton1_actionAdapter(this));
jButton2.setFont(new java.awt.Font("宋体", Font.BOLD, 15));
jButton2.setText("取消");
this.addWindowListener(new TiShi_this_windowAdapter(this));
this.getContentPane().add(jLabel1, new XYConstraints(135, 40, 150, 50));
this.getContentPane().add(jLabel2, new XYConstraints(30, 84, 129, 40));
this.getContentPane().add(jLabel3, new XYConstraints(70, 134, 304, 48));
this.getContentPane().add(jLabel4, new XYConstraints(33, 184, 150, 42));
this.getContentPane().add(jButton1, new XYConstraints(65, 255, 85, 30));
this.getContentPane().add(jButton2, new XYConstraints(230, 255, 85, 30));
}
public static void main(String[] args) {
TiShi t = new TiShi();
}
public void this_windowClosing(WindowEvent e) {
System.exit(0);
}
public void jButton1_actionPerformed(ActionEvent e) {
DengLu d=new DengLu();
d.setTitle("登录界面");
d.setBounds(200,200,400,400);
d.setVisible(true);
}
}
class TiShi_this_windowAdapter extends WindowAdapter {
private TiShi adaptee;
TiShi_this_windowAdapter(TiShi adaptee) {
this.adaptee = adaptee;
}
public void windowClosing(WindowEvent e) {
adaptee.this_windowClosing(e);
}
}
class TiShi_jButton1_actionAdapter implements ActionListener {
private TiShi adaptee;
TiShi_jButton1_actionAdapter(TiShi adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent actionEvent) {
adaptee.jButton1_actionPerformed(e);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -