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

📄 loginsystem.java~1~

📁 实现了一个简单的餐饮行业进销存系统
💻 JAVA~1~
字号:
package com.csbook.restaurant;import java.awt.*;import javax.swing.*;public class LoginSystem extends JDialog {  JPanel northPanel = new JPanel();  JPanel centerPanel = new JPanel();  JPanel southPanel = new JPanel();  FlowLayout flowLayout1 = new FlowLayout();  GridLayout gridLayout1 = new GridLayout();  FlowLayout flowLayout2 = new FlowLayout();  JLabel jLabel1 = new JLabel();  JLabel jLabel2 = new JLabel();  JLabel jLabel3 = new JLabel();  JTextField username = new JTextField();  JPasswordField password = new JPasswordField();  JButton login = new JButton();  public LoginSystem(Frame frame, String title, boolean modal) {    super(frame, title, modal);    try {      jbInit();      pack();    }    catch(Exception ex) {      ex.printStackTrace();    }  }  public LoginSystem() {    this(null, "", false);  }  private void jbInit() throws Exception {    northPanel.setLayout(flowLayout1);    centerPanel.setLayout(gridLayout1);    gridLayout1.setColumns(2);    gridLayout1.setRows(2);    southPanel.setLayout(flowLayout2);    jLabel1.setText("请输入用户名和密码");    jLabel2.setText("用户名");    jLabel3.setText("密码");    username.setText("jTextField1");    password.setText("jPasswordField1");    login.setText("登陆系统");    this.getContentPane().setLayout(null);    southPanel.setBounds(new Rectangle(0, 273, 435, 35));    centerPanel.setBounds(new Rectangle(0, 26, 435, 247));    northPanel.setMaximumSize(new Dimension(32767, 32767));    northPanel.setBounds(new Rectangle(0, 0, 435, 26));    this.getContentPane().add(northPanel, null);    this.getContentPane().add(centerPanel, null);    this.getContentPane().add(southPanel, null);    northPanel.add(jLabel1, null);    centerPanel.add(jLabel2, null);    centerPanel.add(username, null);    centerPanel.add(jLabel3, null);    centerPanel.add(password, null);    southPanel.add(login, null);  }}

⌨️ 快捷键说明

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