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

📄 addreader.java

📁 这是Java数据库系统项目开发实践源代码,所有代码经过测试
💻 JAVA
字号:
package untitled5;import java.awt.*;import java.awt.event.*;import javax.swing.*;import com.borland.jbcl.layout.*;/** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2003</p> * <p>Company: </p> * @author not attributable * @version 1.0 */public class addreader extends JFrame {  JPanel contentPane;  JLabel jLabel1 = new JLabel();  XYLayout xYLayout1 = new XYLayout();  JLabel jLabel2 = new JLabel();  JTextField name = new JTextField();  JLabel jLabel3 = new JLabel();  JPasswordField password = new JPasswordField();  JButton jButton1 = new JButton();  JScrollPane jScrollPane1 = new JScrollPane();  JTextField showmessage = new JTextField();  //Construct the frame  public addreader() {    enableEvents(AWTEvent.WINDOW_EVENT_MASK);    try {      jbInit();    }    catch(Exception e) {      e.printStackTrace();    }  }  //Component initialization  private void jbInit() throws Exception  {    contentPane = (JPanel) this.getContentPane();    contentPane.setLayout(xYLayout1);    this.setSize(new Dimension(400, 400));    this.setTitle("物流管理系统");    jLabel1.setFont(new java.awt.Font("SansSerif", 0, 20));    jLabel1.setForeground(Color.red);    jLabel1.setRequestFocusEnabled(true);    jLabel1.setText("物流管理系统");    jLabel2.setFont(new java.awt.Font("SansSerif", 0, 15));    jLabel2.setRequestFocusEnabled(true);    jLabel2.setText("姓名");    name.setText("");    jLabel3.setFont(new java.awt.Font("SansSerif", 0, 15));    jLabel3.setText("密码");    password.setText("");    jButton1.setFont(new java.awt.Font("SansSerif", 0, 15));    jButton1.setText("登录");    jButton1.addActionListener(new addreader_jButton1_actionAdapter(this));    contentPane.setBackground(UIManager.getColor("Desktop.background"));    contentPane.add(jLabel1,  new XYConstraints(149, 6, 123, 28));    contentPane.add(jLabel2, new XYConstraints(55, 78, -1, -1));    contentPane.add(name,      new XYConstraints(81, 76, 90, 29));    contentPane.add(jLabel3,      new XYConstraints(53, 117, -1, 23));    contentPane.add(password,          new XYConstraints(82, 114, 89, 29));    contentPane.add(jButton1,  new XYConstraints(82, 145, 89, 28));    contentPane.add(jScrollPane1,  new XYConstraints(31, 210, 325, 161));    jScrollPane1.getViewport().add(showmessage, null);  }  //Overridden so we can exit when window is closed  protected void processWindowEvent(WindowEvent e) {    super.processWindowEvent(e);    if (e.getID() == WindowEvent.WINDOW_CLOSING) {      System.exit(0);    }  }  void jButton1_actionPerformed(ActionEvent e) {    String str1=name.getText();    String str2=password.getText();    if((str1.equals("sysman"))&&(str2.equals("tongfang")))    { //System.out.println("a;lkdjfklasjdfj");      this.setVisible(false);      try {     addreader1   Frame= new addreader1();       Frame.show();    }    catch (Exception ew) {          System.out.println(ew.getMessage());    }   }   else{       }  }}class addreader_jButton1_actionAdapter implements java.awt.event.ActionListener {  addreader adaptee;  addreader_jButton1_actionAdapter(addreader adaptee) {    this.adaptee = adaptee;  }  public void actionPerformed(ActionEvent e) {    adaptee.jButton1_actionPerformed(e);  }}

⌨️ 快捷键说明

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