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

📄 guanlidenglu.java~12~

📁 java实战网吧计费系统
💻 JAVA~12~
字号:
package mysystem;

import java.awt.BorderLayout;

import javax.swing.JPanel;
import mysystem.Face;
import javax.swing.JButton;
import java.awt.Rectangle;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.JPasswordField;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.Dimension;
import java.awt.Point;
import java.awt.Color;
import java.awt.Font;
import mysystem.Face;
import javax.swing.JOptionPane;
import javax.swing.ImageIcon;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2007</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class guanlidenglu extends JPanel {


    Face main;
    JButton jButton1 = new JButton();
    JButton jButton2 = new JButton();
    JLabel jLabel1 = new JLabel();
    JLabel jLabel2 = new JLabel();
    JTextField jTextField1 = new JTextField();
    JPasswordField jPasswordField1 = new JPasswordField();
    JLabel jLabel3 = new JLabel();
    JOptionPane jOptionPane1 = new JOptionPane();
    public guanlidenglu(Face f) {
        try {

           main=f;
            jbInit();
        } catch (Exception exception) {
            exception.printStackTrace();
        }
    }

    private void jbInit() throws Exception {
        this.setLayout(null);
        jButton1.setBounds(new Rectangle(110, 350,80, 20));
        jButton1.setFont(new java.awt.Font("楷体_GB2312", Font.PLAIN, 12));
        jButton1.setForeground(Color.magenta);
        jButton1.setText("确定");
        jButton1.addActionListener(new guanlidenglu_jButton1_actionAdapter(this));
        jButton2.setBounds(new Rectangle(250, 350, 80, 20));
        jButton2.setFont(new java.awt.Font("楷体_GB2312", Font.PLAIN, 12));
        jButton2.setForeground(Color.magenta);
        jButton2.setText("重置");
        jLabel1.setFont(new java.awt.Font("楷体_GB2312", Font.PLAIN, 15));
        jLabel1.setForeground(Color.magenta);
        jLabel1.setText("用户名");
        jLabel1.setBounds(new Rectangle(42, 177, 97, 25));
        jLabel2.setFont(new java.awt.Font("楷体_GB2312", Font.PLAIN, 15));
        jLabel2.setForeground(Color.magenta);
        jLabel2.setText("密码");
        jLabel2.setBounds(new Rectangle(50, 230, 80, 20));
        jTextField1.setForeground(Color.magenta);
        jTextField1.setText("");
        jTextField1.setBounds(new Rectangle(110, 180, 80, 20));
        jPasswordField1.setForeground(Color.magenta);
        jPasswordField1.setText("");
        jPasswordField1.setBounds(new Rectangle(110, 230, 80, 20));
        jLabel3.setFont(new java.awt.Font("隶书", Font.PLAIN, 25));
        jLabel3.setForeground(Color.red);
        jLabel3.setText("恶意尝试破解密码是违法行为!");
        jLabel3.setBounds(new Rectangle(20, 70, 390, 40));
        jOptionPane1.setBackground(Color.magenta);
        jOptionPane1.setForeground(Color.green);
        this.add(jLabel2);
        this.add(jLabel1);
        this.add(jTextField1);
        this.add(jPasswordField1);
        this.add(jButton1);
        this.add(jButton2);
        this.add(jLabel3);

    }

    public void jButton1_actionPerformed(ActionEvent e) {

        String u= jTextField1.getText();String U="zhangwei";
        String p= jPasswordField1.getText();String P="1984619";

      if(u.equals(U)==true&&p.equals(P)==true)

     {   guanli shang=new guanli(main);
         main.setContentPane(shang);

         main.show();
     }
      else if(u.equals("")==false&&p.equals("")==false) {jOptionPane1.showMessageDialog(this,"信息输入错误!请重新输入!");}
 }


    }



class guanlidenglu_jButton1_actionAdapter implements ActionListener {
    private guanlidenglu adaptee;
    guanlidenglu_jButton1_actionAdapter(guanlidenglu adaptee) {
        this.adaptee = adaptee;
    }

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

⌨️ 快捷键说明

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