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

📄 atm1.java

📁 取款、取钱、转账、余额查询 票据的打印、等等
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
import java.awt.*;
import java.io.*;
import java.net.*;
import java.sql.*;
import java.lang.*;
import javax.swing.*;
import java.awt.event.*;
import javax.swing.event.*;

public class atm1
{
   public static void main(String []args)
   {
      framhead  fram=new framhead();
      fram.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      fram.show();
   }
}
 class framhead  extends JFrame
{  
   Container contain;
   Connection acone;
   String url="jdbc:odbc:Driver={MicroSoft Access Driver (*.mdb)};DBQ=cantdb.mdb";


   PreparedStatement  astate;
    Statement        astate1;
   String  compe=new String("");
   String storeID;
   String  storemoneys;
   int storemoney=0;
   int get=0;
   windows1  w1=new windows1();
   windows2  w2=new windows2();
   windows3  w3=new windows3();
   windows4  w4=new windows4();
   windows5  w5=new windows5();
   windows6  w6=new windows6();
   windows7  w7=new windows7();
   windows8  w8=new windows8();
   windows9  w9=new windows9();
   windows10  w10=new windows10();
   windows11 w11=new windows11();
   windows12 w12=new windows12();
   windows13 w13=new windows13();
   windows14 w14=new windows14();
   windows15 w15=new windows15();
   windows16 w16=new windows16();
   windows17 w17=new windows17();
   windows18 w18=new windows18();
   framhead()
     {   
        setTitle("自动柜员机");
        setSize(300,270);
        contain=getContentPane();
        CardLayout cc=new CardLayout();
        contain.setLayout(cc);
        contain.add(w1,"1");

        cc.show(contain,"1");

         
      }
     class wfather extends JPanel
     { 
       
       CardLayout cc=new CardLayout();
       BorderLayout bb=new  BorderLayout();
       GridBagLayout gg=new GridBagLayout();
       FlowLayout    ff=new FlowLayout();
       GridLayout    aa=new GridLayout(6,3);
       
       Color c1,c2,c3;
       JLabel e1,e2,e3,e4,e5,e6,e7,e8,e9,e10,e11,e12,e13,e14,e15;
       wfather()
        {     
             c1=new Color(0,0,100);
             c3=new Color(0,100,0);
             c2=new Color(100,100,100);
             setBackground(c3);
             e1=new JLabel("");
             e2=new JLabel("");
             e3=new JLabel("");
             e4=new JLabel("");
             e5=new JLabel("");
             e6=new JLabel("");
             e7=new JLabel("");
             e8=new JLabel("");
             e9=new JLabel("");
             e10=new JLabel("");
             e11=new JLabel("");
             e12=new JLabel("");
             e13=new JLabel("");
             e14=new JLabel("");
             e15=new JLabel("");

              
             
         }
       
    
        
     }
   class windows18 extends wfather
     { 
        JButton b1,b2;
        JLabel la1;
        
        windows18()
         {   
             setLayout(super.aa);
            
             b1=new JButton("确定");
             b1.setBackground(super.c2);
             b1.addActionListener(new myaction());
             la1=new JLabel("转帐成功");
             add(super.e2);
             add(super.e3);
             add(super.e10);
             add(super.e4);
             add(super.e1);
             add(super.e5);
             add(super.e15);
             add(la1);
             add(super.e6);
             add(super.e7);
             add(super.e8);
             add(super.e12);
             add(super.e13);
             add(super.e14);
             add(b1);
 

             

          }
     }
   class windows17 extends wfather
     { 
        JButton b1,b2;
        JLabel la1;
        
        windows17()
         {   
             setLayout(super.aa);
            
             b1=new JButton("确定");
             b1.setBackground(super.c2);
             b1.addActionListener(new myaction());
             la1=new JLabel("取款只为50整倍");
             add(super.e2);
             add(super.e3);
             add(super.e10);
             add(super.e4);
             add(super.e1);
             add(super.e5);
             add(super.e15);
             add(la1);
             add(super.e6);
             add(super.e7);
             add(super.e8);
             add(super.e12);
             add(super.e13);
             add(super.e14);
             add(b1);
 

             

          }
     }
   class windows16 extends wfather
     { 
        JButton b1,b2;
        JLabel la1;
        
        windows16()
         {   
             setLayout(super.aa);
            
             b1=new JButton("确定");
             b1.setBackground(super.c2);
             b1.addActionListener(new myaction());
             la1=new JLabel("现有金额不足");
             add(super.e2);
             add(super.e3);
             add(super.e10);
             add(super.e4);
             add(super.e1);
             add(super.e5);
             add(super.e15);
             add(la1);
             add(super.e6);
             add(super.e7);
             add(super.e8);
             add(super.e12);
             add(super.e13);
             add(super.e14);
             add(b1);
 

             

          }
     }
 
   class windows15 extends wfather
     { 
        JButton b1,b2;
        JTextField t1,t2;
        JLabel la1,la2;
        
        windows15()
         {   
             setLayout(super.aa);
            
             b1=new JButton("确认");
             b1.setBackground(super.c2);
             b1.addActionListener(new myaction());
             b2=new JButton("取消");
             b2.setBackground(super.c2);
             b2.addActionListener(new myaction());
             t1=new JTextField ("",5);
             t2=new JTextField ("",5);
             la1=new JLabel("转入号码:");
             la2=new JLabel("转入金额:");
             add(super.e2);
             add(super.e3);
             add(super.e10);
             add(la1);
             add(t1);
             add(super.e5);
             add(super.e6);
             add(super.e7);
             add(super.e8);
             add(la2);
             add(t2);
             add(b1);
             add(super.e13);
             add(super.e14);
             add(b2);
 

             

          }
     }
    class windows14 extends wfather
     { 
        JButton b1;
        JLabel la1;
        
        windows14()
         {   
             setLayout(super.aa);
            
             b1=new JButton("确定");
             b1.setBackground(super.c2);
             b1.addActionListener(new myaction());
             la1=new JLabel("输入错误!");
             add(super.e2);
             add(super.e3);
             add(super.e10);
             add(super.e4);
             add(super.e1);
             add(super.e5);
             add(super.e15);
             add(la1);
             add(super.e6);
             add(super.e7);
             add(super.e8);
             add(super.e12);
             add(super.e13);
             add(super.e14);
             add(b1);
 

             

          }
     }
   class windows13 extends wfather
     { 
        JButton b1;
        JLabel la1;
        
        windows13()
         {   
             setLayout(super.aa);
            
             b1=new JButton("确定");
             b1.setBackground(super.c2);
             b1.addActionListener(new myaction());
             la1=new JLabel("请选择金额");
             add(super.e2);
             add(super.e3);
             add(super.e10);
             add(super.e4);
             add(super.e1);
             add(super.e5);
             add(super.e15);
             add(la1);
             add(super.e6);
             add(super.e7);
             add(super.e8);
             add(super.e12);
             add(super.e13);
             add(super.e14);
             add(b1);
 

             

          }
     }
   class windows12 extends wfather
     { 
        JButton b1;
        JLabel la1;
        
        windows12()
         {   
             setLayout(super.aa);
            
             b1=new JButton("确定");
             b1.setBackground(super.c2);
             b1.addActionListener(new myaction());
             la1=new JLabel("更改密码失败");
             add(super.e2);
             add(super.e3);
             add(super.e10);
             add(super.e4);
             add(super.e1);
             add(super.e5);
             add(super.e15);
             add(la1);
             add(super.e6);
             add(super.e7);
             add(super.e8);
             add(super.e12);
             add(super.e13);
             add(super.e14);
             add(b1);
 

             

          }
     }
    class windows11 extends wfather
     { 
        JButton b1;
        JLabel la1;
        
        windows11()
         {   
             setLayout(super.aa);
            
             b1=new JButton("确定");
             b1.setBackground(super.c2);
             b1.addActionListener(new myaction());
             la1=new JLabel("成功请取走现金");
             add(super.e2);
             add(super.e3);
             add(super.e10);
             add(super.e4);
             add(super.e1);
             add(super.e5);
             add(super.e15);
             add(la1);
             add(super.e6);
             add(super.e7);
             add(super.e8);
             add(super.e12);
             add(super.e13);
             add(super.e14);
             add(b1);
 

             

          }
     }
   class windows10 extends wfather
     { 
        JButton b1;
        JTextField la1;
        
        windows10()
         {   
             setLayout(super.aa);
            
             b1=new JButton("确认");
             b1.setBackground(super.c2);
             b1.addActionListener(new myaction());
             la1=new JTextField ("",5);
             add(super.e2);
             add(super.e3);

⌨️ 快捷键说明

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