⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 增加职工.java

📁 第一学期编写的JAVA程序
💻 JAVA
字号:
package 固定资产管理系统;

import java.awt.BorderLayout;

import javax.swing.JFrame;
import javax.swing.JLabel;
import java.awt.*;
import javax.swing.*;
import javax.swing.border.TitledBorder;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2007</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class 增加职工 extends JFrame {
    public 增加职工() {
        try {
            jbInit();
        } catch (Exception exception) {
            exception.printStackTrace();
        }
    }

    private void jbInit() throws Exception {
        getContentPane().setLayout(null);

        lbl备注.setFont(new java.awt.Font("Dialog", Font.PLAIN, 15));
        lbl备注.setBorder(null);
        lbl备注.setHorizontalAlignment(SwingConstants.CENTER);
        lbl备注.setText("备注:");
        lbl备注.setBounds(new Rectangle(99, 137, 79, 33));
        lbl职工号.setFont(new java.awt.Font("Dialog", Font.PLAIN, 15));
        lbl职工号.setBorder(null);
        lbl职工号.setHorizontalAlignment(SwingConstants.CENTER);
        lbl职工号.setText("职工号:");
        lbl职工号.setBounds(new Rectangle(91, 10, 79, 33));
        lbl姓名.setFont(new java.awt.Font("Dialog", Font.PLAIN, 15));
        lbl姓名.setBorder(null);
        lbl姓名.setHorizontalAlignment(SwingConstants.CENTER);
        lbl姓名.setText("姓名:");
        lbl姓名.setBounds(new Rectangle(95, 51, 79, 33));
        txt姓名.setFont(new java.awt.Font("Dialog", Font.PLAIN, 15));
        txt姓名.setBorder(BorderFactory.createLineBorder(Color.black));
        txt姓名.setText("");
        txt姓名.setBounds(new Rectangle(160, 54, 124, 31));
        txtarea备注.setBorder(BorderFactory.createLineBorder(Color.black));
        txtarea备注.setText("");
        txtarea备注.setBounds(new Rectangle(160, 140, 125, 97));
        txt职工号.setFont(new java.awt.Font("Dialog", Font.PLAIN, 15));
        txt职工号.setBorder(BorderFactory.createLineBorder(Color.black));
        txt职工号.setText("");
        txt职工号.setBounds(new Rectangle(162, 11, 124, 31));
        txt工作位.setFont(new java.awt.Font("Dialog", Font.PLAIN, 15));
        txt工作位.setBorder(BorderFactory.createLineBorder(Color.black));
        txt工作位.setBounds(new Rectangle(161, 96, 124, 31));
        btn增加.setBackground(Color.blue);
        btn增加.setBounds(new Rectangle(22, 253, 80, 37));
        btn增加.setFont(new java.awt.Font("Dialog", Font.PLAIN, 15));
        btn增加.setBorder(BorderFactory.createLineBorder(Color.black));
        btn增加.setText("增加");
        btn修改.setBackground(Color.magenta);
        btn修改.setBounds(new Rectangle(114, 252, 80, 37));
        btn修改.setFont(new java.awt.Font("Dialog", Font.PLAIN, 15));
        btn修改.setBorder(BorderFactory.createLineBorder(Color.black));
        btn修改.setText("修改");
        btn删除.setBackground(Color.green);
        btn删除.setBounds(new Rectangle(207, 252, 80, 37));
        btn删除.setFont(new java.awt.Font("Dialog", Font.PLAIN, 15));
        btn删除.setBorder(BorderFactory.createLineBorder(Color.black));
        btn删除.setText("删除");
        btn查询.setBackground(Color.red);
        btn查询.setBounds(new Rectangle(299, 252, 80, 37));
        btn查询.setFont(new java.awt.Font("Dialog", Font.PLAIN, 15));
        btn查询.setBorder(BorderFactory.createLineBorder(Color.black));
        btn查询.setText("查询");
        btn删除.setEnabled(false);
        btn修改.setEnabled(false);
        this.getContentPane().add(btn删除);
        this.getContentPane().add(btn增加);
        this.getContentPane().add(btn修改);
        this.getContentPane().add(btn查询);
        this.getContentPane().add(txt职工号);
        this.getContentPane().add(txt姓名);
        this.getContentPane().add(txt工作位);
        this.getContentPane().add(txtarea备注);
        this.getContentPane().add(lbl姓名);
        this.getContentPane().add(lbl职工号);
        this.getContentPane().add(lbl工作位);
        this.getContentPane().add(lbl备注);
        btn删除.setEnabled(true);
        btn增加.setEnabled(true);
        btn修改.setEnabled(true);
        btn查询.setEnabled(true);


        lbl工作位.setFont(new java.awt.Font("Dialog", Font.PLAIN, 15));
        lbl工作位.setBorder(null);
        lbl工作位.setHorizontalAlignment(SwingConstants.CENTER);
        lbl工作位.setText("工作位:");
        lbl工作位.setBounds(new Rectangle(90, 95, 79, 33));
        this.setLocation(300,300);
        this.setSize(400,350);
        this.setVisible(true);
    }

    JLabel lbl备注 = new JLabel();
    JLabel lbl工作位 = new JLabel();
    JLabel lbl姓名 = new JLabel();
    JLabel lbl职工号 = new JLabel();
    JTextField txt工作位 = new JTextField();
    JTextField txt职工号 = new JTextField();
    JTextField txt姓名 = new JTextField();
    JTextArea txtarea备注 = new JTextArea();
    JButton btn查询 = new JButton();
    JButton btn增加 = new JButton();
    JButton btn修改 = new JButton();
    JButton btn删除 = new JButton();
    TitledBorder titledBorder1 = new TitledBorder("");
}

⌨️ 快捷键说明

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