tishi.java~2~

来自「一個模仿ATM自動提款机功能的系統,」· JAVA~2~ 代码 · 共 70 行

JAVA~2~
70
字号
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;

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("继续");
        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);
    }
}


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);
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?