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

📄 delbook.java~2~

📁 基于Java的物流管理系统的开发与应用
💻 JAVA~2~
字号:
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 delbook extends JFrame {  JPanel contentPane;  XYLayout xYLayout1 = new XYLayout();  JLabel jLabel1 = new JLabel();  JLabel jLabel2 = new JLabel();  JTextField name = new JTextField();  JLabel jLabel3 = new JLabel();  JPasswordField password = new JPasswordField();  JButton jButton1 = new JButton();  JScrollPane jScrollPane1 = new JScrollPane();  JTextArea showmessage = new JTextArea();  //Construct the frame  public delbook() {    enableEvents(AWTEvent.WINDOW_EVENT_MASK);    try {      jbInit();    }    catch(Exception e) {      e.printStackTrace();    }  }  //Component initialization  private void jbInit() throws Exception  {    contentPane = (JPanel) this.getContentPane();    jLabel1.setFont(new java.awt.Font("SansSerif", 0, 20));    jLabel1.setForeground(Color.red);    jLabel1.setText("图书管理系统");    contentPane.setLayout(xYLayout1);    this.setSize(new Dimension(400, 300));    this.setTitle("Frame Title");    jLabel2.setFont(new java.awt.Font("SansSerif", 0, 15));    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 delbook_jButton1_actionAdapter(this));    showmessage.setText("");    contentPane.add(jLabel1,  new XYConstraints(114, 0, 131, 32));    contentPane.add(jLabel2,      new XYConstraints(77, 67, 38, 31));    contentPane.add(name,      new XYConstraints(105, 70, 105, 32));    contentPane.add(password,      new XYConstraints(108, 120, 102, 31));    contentPane.add(jLabel3,   new XYConstraints(79, 124, -1, 29));    contentPane.add(jButton1,       new XYConstraints(219, 122, 86, 29));    contentPane.add(jScrollPane1,  new XYConstraints(44, 172, 308, 108));    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");       try {      delreader1   Frame= new delreader1();        Frame.show();     }     catch (Exception ew) {           System.out.println(ew.getMessage());     }    }    else{      String outputarea = "你无权更改系统";      showmessage.setText(outputarea);    }  }}class delbook_jButton1_actionAdapter implements java.awt.event.ActionListener {  delbook adaptee;  delbook_jButton1_actionAdapter(delbook adaptee) {    this.adaptee = adaptee;  }  public void actionPerformed(ActionEvent e) {    adaptee.jButton1_actionPerformed(e);  }}

⌨️ 快捷键说明

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