help.java

来自「车辆管理系统」· Java 代码 · 共 59 行

JAVA
59
字号
package carmanage;

import java.awt.BorderLayout;

import javax.swing.JFrame;
import javax.swing.JTextArea;
import java.awt.Rectangle;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JButton;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class Help extends JFrame {
    public Help() {
        try {
            jbInit();
        } catch (Exception exception) {
            exception.printStackTrace();
        }
    }

    private void jbInit() throws Exception {
        getContentPane().setLayout(null);
        jTextArea1.setBounds(new Rectangle(24, 61, 357, 188));
        btnReturn.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
        btnReturn.addActionListener(new Help_btnReturn_actionAdapter(this));
        this.getContentPane().add(jLabel1);
        btnReturn.setBounds(new Rectangle(212, 261, 110, 30));
        btnReturn.setText("返回");
        this.getContentPane().add(jTextArea1);
        this.getContentPane().add(btnReturn);
        jLabel1.setFont(new java.awt.Font("宋体", Font.PLAIN, 50));
        jLabel1.setText("帮助");
        jLabel1.setBounds(new Rectangle(152, 11, 124, 44));
        this.setSize(400,400);
        this.setVisible(true);
    }

    JTextArea jTextArea1 = new JTextArea();
    JLabel jLabel1 = new JLabel();
    JButton btnReturn = new JButton();
    public void btnReturn_actionPerformed(ActionEvent e) {
    this.dispose();
    }
}


class Help_btnReturn_actionAdapter implements ActionListener {
    private Help adaptee;
    Help_btnReturn_actionAdapter(Help adaptee) {
        this.adaptee = adaptee;
    }

    public void actionPerformed(ActionEvent e) {
        adaptee.btnReturn_actionPerformed(e);
    }
}

⌨️ 快捷键说明

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