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

📄 serverwindows.java

📁 模拟银行的ATM自动取款机
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
      
      setSize(300,150);
      setBackground(Color.lightGray);
      setLocation(200,200);
      setLayout(new GridLayout(2,1));
      
      Container con0=new Container();
      con0.setLayout(new FlowLayout());
      Font font=new Font("Arial",Font.BOLD,24);
      con0.setFont(font);
      con0.add(lab);
      
      Container con1=new Container();
      con1.setLayout(new FlowLayout());
      con1.add(back);
      
      back.addActionListener(this);
      
      add(con0);
      add(con1);
      
      setVisible(true);
   }
   
   
   public void actionPerformed(ActionEvent ae){
      String command=(String)ae.getActionCommand();
      if(command=="返回"){
         setVisible(false);
         new Manage(manager);
      }
   }
}

class enableOk extends Frame implements ActionListener{
   Label lab;
   Button back;
   ManagerOperate manager;
   
   public enableOk(ManagerOperate manager){
      this.manager=manager;
      
      lab=new Label("帐户启用成功!");
      back=new Button("返回");
      
      setSize(300,150);
      setBackground(Color.lightGray);
      setLocation(200,200);
      setLayout(new GridLayout(2,1));
      
      Container con0=new Container();
      con0.setLayout(new FlowLayout());
      Font font=new Font("Arial",Font.BOLD,24);
      con0.setFont(font);
      con0.add(lab);
      
      Container con1=new Container();
      con1.setLayout(new FlowLayout());
      con1.add(back);
      
      back.addActionListener(this);
      
      add(con0);
      add(con1);
      
      setVisible(true);
   }
   
   
   public void actionPerformed(ActionEvent ae){
      String command=(String)ae.getActionCommand();
      if(command=="返回"){
         setVisible(false);
         new Manage(manager);
      }
   }
}


class enableError2 extends Frame implements ActionListener{
   Label lab;
   Button back;
   ManagerOperate manager;
   
   public enableError2(ManagerOperate manager){
      this.manager=manager;
      
      lab=new Label("身份证号错误或帐户本来可用");
      back=new Button("返回");
      
      setSize(300,150);
      setBackground(Color.lightGray);
      setLocation(200,200);
      setLayout(new GridLayout(2,1));
      
      Container con0=new Container();
      con0.setLayout(new FlowLayout());
      Font font=new Font("Arial",Font.BOLD,19);
      con0.setFont(font);
      con0.add(lab);
      
      Container con1=new Container();
      con1.setLayout(new FlowLayout());
      con1.add(back);
      
      back.addActionListener(this);
      
      add(con0);
      add(con1);
      
      setVisible(true);
   }
   
   
   public void actionPerformed(ActionEvent ae){
      String command=(String)ae.getActionCommand();
      if(command=="返回"){
         setVisible(false);
         new Manage(manager);
      }
   }
}

class saveError extends Frame implements ActionListener{
   Label lab;
   Button back;
   ManagerOperate manager;
   Employer account;
   
   public saveError(ManagerOperate manager,Employer account){
      this.manager=manager;
      this.account=account;
      
      lab=new Label("存款金额超出可行范围");
      back=new Button("返回");
      
      setSize(300,150);
      setBackground(Color.lightGray);
      setLocation(200,200);
      setLayout(new GridLayout(2,1));
      
      Container con0=new Container();
      con0.setLayout(new FlowLayout());
      Font font=new Font("Arial",Font.BOLD,19);
      con0.setFont(font);
      con0.add(lab);
      
      Container con1=new Container();
      con1.setLayout(new FlowLayout());
      con1.add(back);
      
      back.addActionListener(this);
      
      add(con0);
      add(con1);
      
      setVisible(true);
   }
   
   
   public void actionPerformed(ActionEvent ae){
      String command=(String)ae.getActionCommand();
      if(command=="返回"){
         setVisible(false);
         new operateUser(manager,account);
      }
   }
}


class ManagerMessage extends Frame implements ActionListener{
   Label title;
   Label id;
   Label name;
   Label idCard;
   Label state;
   Button enter;
   ManagerOperate manager;
   ManagerOperate m;
   
   public ManagerMessage(ManagerOperate manager,ManagerOperate m){
      this.manager=manager;
      this.m=m;
      
      title=new Label("管理员信息查询");
      id=new Label("");
      name=new Label("");
      idCard=new Label("");
      state=new Label("");
      enter=new Button("确定");
      
      setSize(250,250);
      setBackground(Color.lightGray);
      setLocation(200,200);
      setLayout(new GridLayout(6,1));
      
      Font f=new Font("Arial",Font.PLAIN,14);
      setFont(f);
      
      Container con0=new Container();
      con0.setLayout(new FlowLayout());
      Font font=new Font("Arial",Font.BOLD,22);
      con0.setFont(font);
      con0.add(title);
      
      Container con1=new Container();
      con1.setLayout(new FlowLayout());
      con1.add(id);
      
      Container con2=new Container();
      con2.setLayout(new FlowLayout());
      con2.add(name);
      
      Container con3=new Container();
      con3.setLayout(new FlowLayout());
      con3.add(idCard);
      
      Container con4=new Container();
      con4.setLayout(new FlowLayout());
      con4.add(state);
      
      Container con5=new Container();
      con5.setLayout(new FlowLayout());
      con5.add(enter);
      
      String sid=m.getid();
      String sidCard=m.getidcard();
      String sname=m.getname();
      int s=m.getifmaster();
      System.out.print(s);
      String sstate=null;
      if(s==1){
         sstate=new String("超级管理员");
      }
      else{
         sstate=new String("普通管理员");
      }
      id.setText("管理员ID:"+sid);
      name.setText("姓名:"+sname);
      idCard.setText("身份证号:"+sidCard);
      state.setText("管理员类属:"+sstate);
      
      
      add(con0);
      add(con1);
      add(con2);
      add(con3);
      add(con4);
      add(con5);
      
      setVisible(true);
      
      enter.addActionListener(this);
   }
   
   public void actionPerformed(ActionEvent ae){
      String command=(String)ae.getActionCommand();
      if(command=="确定"){
         setVisible(false);
         new Manage(manager);
      }
   }
}
         
         
class accountQuery extends Frame implements ActionListener{
   Label title;
   Label id;
   Label idCard;
   Label name;
   Label money;
   Button enter;
   Label state;
   Label tel;
   ManagerOperate manager;
   Employer account;
   
   public accountQuery(ManagerOperate manager,Employer account){
      this.manager=manager;
      this.account=account;
      
      title=new Label("帐户信息显示");
      id=new Label("");
      idCard=new Label("");
      name=new Label("");
      money=new Label("");
      state=new Label("");
      tel=new Label("");
      enter=new Button("确定");
      
      setSize(250,300);
      setBackground(Color.lightGray);
      setLocation(200,200);
      setLayout(new GridLayout(8,1));
   
      Container con0=new Container();
      con0.setLayout(new FlowLayout());
      Font font=new Font("Arial",Font.BOLD,22);
      con0.setFont(font);
      con0.add(title);
      
      Container con1=new Container();
      con1.setLayout(new FlowLayout());
      con1.add(id);
      
      Container con2=new Container();
      con2.setLayout(new FlowLayout());
      con2.add(name);
      
      Container con3=new Container();
      con3.setLayout(new FlowLayout());
      con3.add(idCard);
      
      Container con4=new Container();
      con4.setLayout(new FlowLayout());
      con4.add(money);
      
      Container con5=new Container();
      con5.setLayout(new FlowLayout());
      con5.add(tel);
      
      Container con6=new Container();
      con6.setLayout(new FlowLayout());
      con6.add(state);
      
      Container con7=new Container();
      con7.setLayout(new FlowLayout());
      con7.add(enter);
      
      add(con0);
      add(con1);
      add(con2);
      add(con3);
      add(con4);
      add(con5);
      add(con6);
      add(con7);
      
      Font f=new Font("Arial",Font.PLAIN,14);
      setFont(f);
      
      String sid=account.getCustomerCardNo();
      String sidCard=account.getCustomerID();
      String sname=account.getName();
      String stel=account.getTel();
      String smoney=String.valueOf(account.getMoney());
      int s=account.getCardState();
      String sstate=null;
      if(s==1) sstate=new String("用户所持为信用卡");
      else sstate=new String("用户所持为储蓄卡");
      id.setText("卡号:"+sid);
      idCard.setText("身份证号:"+sidCard);
      name.setText("姓名:"+sname);
      tel.setText("联系电话:"+stel);
      money.setText("帐上金额:"+smoney);
      state.setText(sstate);
      
      
      setVisible(true);
      
      enter.addActionListener(this);
   }
   
   public void actionPerformed(ActionEvent ae){
      String command=(String)ae.getActionCommand();
      if(command=="确定"){
         setVisible(false);
         new operateUser(manager,account);
      }
   }
}

class toDelete extends Frame implements ActionListener{
   Label lab;
   Button enter;
   Button back;
   ManagerOperate manager;
   Employer account;
   
   public toDelete(ManagerOperate manager,Employer account){
      lab=new Label("是否确定注销当前帐户?");
      enter=new Button("确定");
      back=new Button("返回");
      
      this.manager=manager;
      this.account=account;
      
      setSize(300,150);
      setBackground(Color.lightGray);
      setLocation(200,200);
      setLayout(new GridLayout(2,1));
      
      Container con0=new Container();
      con0.setLayout(new FlowLayout());
      Font font=new Font("Arial",Font.BOLD,19);
      con0.setFont(font);
      con0.add(lab);
      
      Container con1=new Container();
      con1.setLayout(new FlowLayout());
      con1.add(enter);
      con1.add(back);
      
      add(con0);
      add(con1);
      
      setVisible(true);
      
      enter.addActionListener(this);
      back.addActionListener(this);
   }
   
   public void actionPerformed(ActionEvent ae){
      String command=(String)ae.getActionCommand();
      if(command=="确定"){
         setVisible(false);
         account.delCard();
         new deleteOk(manager);
      }
      if(command=="返回"){
         setVisible(false);
         new operateUser(manager,account);
      }
   }
}

class deleteOk extends Frame implements ActionListener{
   Label lab;
   Button back;
   ManagerOperate manager;
   
   public deleteOk(ManagerOperate manager){
      this.manager=manager;
      
      lab=new Label("当前帐户已成功注销");
      back=new Button("确定");
      
      setSize(300,150);
      setBackground(Color.lightGray);
      setLocation(200,200);
      setLayout(new GridLayout(2,1));
      Container con0=new Container();
      con0.setLayout(new FlowLayout());
      Font font=new Font("Arial",Font.BOLD,19);
      con0.setFont(font);
      con0.add(lab);
      
      Container con1=new Container();
      con1.setLayout(new FlowLayout());
      con1.add(back);
      
      back.addActionListener(this);
      
      add(con0);
      add(con1);
      
      setVisible(true);
   }
   
   
   public void actionPerformed(ActionEvent ae){
      String command=(String)ae.getActionCommand();
      if(command=="确定"){
         setVisible(false);
         new Manage(manager);
      }
   }
}

class cantDelete extends Frame implements ActionListener{
   Label lab;
   Button back;
   ManagerOperate manager;
   Employer account;
   
   public cantDelete(ManagerOperate manager,Employer account,int state){
      this.manager=manager;
      this.account=account;
      
      if(state==0){
         lab=new Label("帐户尚有余额,无法注销");
      }
      else{
         lab=new Label("帐户欠款,无法注销");
      }
      back=new Button("确定");
      
      setSize(300,150);
      setBackground(Color.lightGray);
      setLocation(200,200);
      setLayout(new GridLayout(2,1));
      Container con0=new Container();
      con0.setLayout(new FlowLayout());
      Font f

⌨️ 快捷键说明

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