亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? mainfrme.java

?? 一個模仿ATM自動提款機功能的系統(tǒng),
?? JAVA
字號:
package MainFrame;
import java.awt.*;
import javax.swing.*;
import com.borland.jbcl.layout.XYLayout;
import com.borland.jbcl.layout.*;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.ResultSet;
import DataBaseManager.DataBaseManager;
import java.sql.Statement;
import java.sql.Connection;
import java.sql.DriverManager;

public class MainFrme extends JFrame {
    XYLayout xYLayout1 = new XYLayout();
    JLabel jLabel1 = new JLabel();
    JLabel jLabel2 = new JLabel();
    JLabel jLabel3 = new JLabel();
    JTextField jTextField2 = new JTextField();
    JButton jButton1 = new JButton();
    JTabbedPane jTabbedPane1 = new JTabbedPane();
    JLabel jLabel4 = new JLabel();
    JLabel jLabel5 = new JLabel();
    JTextField jTextField3 = new JTextField();
    JButton jButton2 = new JButton();
    JTabbedPane jTabbedPane2 = new JTabbedPane();
    JLabel jLabel6 = new JLabel();
    JLabel jLabel7 = new JLabel();
    JTextField jTextField4 = new JTextField();
    JLabel jLabel8 = new JLabel();
    JTextField jTextField5 = new JTextField();
    JButton jButton3 = new JButton();
    JButton jButton4 = new JButton();
    JPasswordField jPasswordField1 = new JPasswordField();
    public MainFrme() {
        try {
            jbInit();
        } catch (Exception exception) {
            exception.printStackTrace();
        }
    }

    private void jbInit() throws Exception {
        getContentPane().setLayout(xYLayout1);
        jLabel1.setFont(new java.awt.Font("華文彩云", Font.BOLD, 18));
        jLabel1.setForeground(Color.green);
        jLabel1.setText("查詢操作");
        jButton1.setText("查詢");
        jButton1.addActionListener(new MainFrme_jButton1_actionAdapter(this));
        xYLayout1.setWidth(471);
        xYLayout1.setHeight(383);
        jTextField2.setEditable(false);
        jLabel3.setFont(new java.awt.Font("宋體", Font.BOLD, 15));
        jLabel3.setText("余額");
        jLabel4.setFont(new java.awt.Font("華文彩云", Font.BOLD, 18));
        jLabel4.setForeground(Color.green);
        jLabel4.setText("取款操作");
        jLabel5.setFont(new java.awt.Font("宋體", Font.BOLD, 15));
        jLabel5.setText("操作金額");
        jButton2.setText("取款");
        jButton2.addActionListener(new MainFrme_jButton2_actionAdapter(this));
        jLabel6.setFont(new java.awt.Font("華文彩云", Font.BOLD, 18));
        jLabel6.setForeground(Color.green);
        jLabel6.setText("轉(zhuǎn)帳操作");
        jLabel7.setFont(new java.awt.Font("宋體", Font.BOLD, 15));
        jLabel7.setText("轉(zhuǎn)入帳號");
        jLabel8.setFont(new java.awt.Font("宋體", Font.BOLD, 15));
        jLabel8.setText("操作金額");
        jButton3.setText("確定");
        jButton3.addActionListener(new MainFrme_jButton3_actionAdapter(this));
        jButton4.setText("退出");
        jButton4.addActionListener(new MainFrme_jButton4_actionAdapter(this));
        this.getContentPane().add(jLabel2, new XYConstraints(9, 11, 66, 28));
        this.getContentPane().add(jLabel1, new XYConstraints(10, 51, 120, 30));
        this.getContentPane().add(jTabbedPane2,
                                  new XYConstraints(1, 220, 470, 7));

        this.getContentPane().add(jTextField2,
                                  new XYConstraints(130, 80, 150, 30));
        this.getContentPane().add(jLabel4, new XYConstraints(12, 130, 120, 29));
        this.getContentPane().add(jLabel5, new XYConstraints(30, 169, 84, 36));
        this.getContentPane().add(jButton2, new XYConstraints(360, 160, 70, 40));
        this.getContentPane().add(jButton3, new XYConstraints(360, 288, 70, 40));

        this.getContentPane().add(jTextField4,
                                  new XYConstraints(125, 275, 150, 30));
        this.getContentPane().add(jLabel8, new XYConstraints(26, 323, 79, 36));
        this.getContentPane().add(jTextField5,
                                  new XYConstraints(125, 320, 150, 30));
        this.getContentPane().add(jTabbedPane1,
                                  new XYConstraints(1, 121, 469, -1));
        this.getContentPane().add(jLabel6, new XYConstraints(14, 233, 95, 35));
        this.getContentPane().add(jLabel7, new XYConstraints(30, 278, 84, 33));
        this.getContentPane().add(jLabel3, new XYConstraints(30, 82, 84, 31));
        this.getContentPane().add(jButton4, new XYConstraints(360, 8, 70, 40));
        this.getContentPane().add(jTextField3,
                                  new XYConstraints(130, 165, 150, 36));
        this.getContentPane().add(jButton1, new XYConstraints(360, 75, 70, 40));
        this.getContentPane().add(jPasswordField1,
                                  new XYConstraints(128, 12, 152, 32));
        jLabel2.setFont(new java.awt.Font("宋體", Font.BOLD, 12));
        jLabel2.setText("用戶密碼");
    }

    public static void main(String[] args) {
        MainFrme m= new MainFrme();
          m.setBounds(200,200,500,500);
        m.setVisible(true);
    }

    public void jButton1_actionPerformed(ActionEvent e) {
          try {char a[]=jPasswordField1.getPassword();
              String c=new String(a);
              if(a.length==0){
                  JOptionPane.showMessageDialog(null,"沒有輸入密碼!","輸入錯誤",JOptionPane.ERROR_MESSAGE);
              }else  {ResultSet rs;
                     DataBaseManager dbm=new DataBaseManager();
                     dbm.connect();
                     String sql="select * from userTable where userpassword='"+ c+"'";
                     rs=dbm.getResult(sql);
             if(rs.next()){
                   jTextField2.setText(""+rs.getDouble("usermoney"));             }
               else  JOptionPane.showMessageDialog(null,"沒有該密碼用戶");
                       jTextField2.getText();
             }
          } catch (Exception ex) {
               JOptionPane.showMessageDialog(null,"操作錯誤");
          }
    }

    public void jButton2_actionPerformed(ActionEvent e) {
        try { Connection con;
              Statement stmt;
              ResultSet rs1,rs2;
              char a[]=jPasswordField1.getPassword();
              String b=new String(a);
              String c=jTextField3.getText();
              float p=Float.parseFloat(c);
              if(c.equals("")){
        JOptionPane.showMessageDialog(null,"沒有輸入交易金額!","輸入錯誤",JOptionPane.ERROR_MESSAGE);}
   else if(a.length==0){
          JOptionPane.showMessageDialog(null,"沒有輸入密碼!","輸入錯誤",JOptionPane.ERROR_MESSAGE); }
      else {
          try {  Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
                 Connection conn = DriverManager.getConnection(
                                     "jdbc:microsoft:sqlserver://localhost:1433;databaseName=ATM",
                                     "sa", "");
                       Statement   Stat = conn.createStatement();
                        rs1 = Stat.executeQuery("select * from userTable where userpassword='"+b+"'");
               if(rs1.next()){
                   if(p<rs1.getFloat("usermoney")){
                   Stat.executeUpdate("update userTable set usermoney=usermoney-'"+c+"' where userpassword='"+b+"'");
                   JOptionPane.showMessageDialog(null,"您成功取了"+c);
                   jTextField3.setText("");
                   }else JOptionPane.showMessageDialog(null,"餘額不足!");}
               else {
                    JOptionPane.showMessageDialog(null,"密碼錯誤!");
                      jTextField3.setText("");
                      jPasswordField1.setText("");
  }
      }catch (Exception ex) {
         System.out.println("數(shù)據(jù)庫連接失敗");
               }
    }
        } catch (Exception ex) {
             JOptionPane.showMessageDialog(null,"操作錯誤");
        }
    }

    public void jButton3_actionPerformed(ActionEvent e) {
   try {   char a[]=jPasswordField1.getPassword();
           String b=new String(a);
           String c=jTextField4.getText();
           String d=jTextField5.getText();
           float q=Float.parseFloat(d);
           if(a.length==0){ JOptionPane.showMessageDialog(null,"沒有輸入密碼!","輸入錯誤",JOptionPane.ERROR_MESSAGE);}
          else{ {if(c.equals("")){
              JOptionPane.showMessageDialog(null,"沒有輸入轉(zhuǎn)入ID!","輸入錯誤",JOptionPane.ERROR_MESSAGE);}
         else {if(d.equals("")){
                  JOptionPane.showMessageDialog(null,"沒有輸入操作金額!","輸入錯誤",JOptionPane.ERROR_MESSAGE);}
              else { Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
                       Connection conn = DriverManager.getConnection(
                                         "jdbc:microsoft:sqlserver://localhost:1433;databaseName=ATM",
                                         "sa", "");
                          Statement   Stat = conn.createStatement();
                          ResultSet  rs1 = Stat.executeQuery("select * from userTable where userpassword='"+ b+"'");
                          if(rs1.next()){

                         if(q<rs1.getFloat("usermoney")){
                         Stat.executeUpdate("update userTable set usermoney=usermoney-'"+d+"' where userpassword='"+b+"'");
                          Stat.executeUpdate("update userTable set usermoney=usermoney+'"+d+"' where userpassword='"+c+"'");
                         JOptionPane.showMessageDialog(null,"操作成功");
                              jTextField4.setText("");
                               jTextField5.setText("");
                              }}

         }
         }}}
   } catch (Exception ex) {
        JOptionPane.showMessageDialog(null,"操作錯誤");
   }
    }

    public void jButton4_actionPerformed(ActionEvent e) {
       DengLu d=new DengLu();
       d.setBounds(200,200,400,400);
       d.setVisible(true);}
    }
class MainFrme_jButton4_actionAdapter implements ActionListener {
    private MainFrme adaptee;
    MainFrme_jButton4_actionAdapter(MainFrme adaptee) {
        this.adaptee = adaptee;
    }

    public void actionPerformed(ActionEvent e) {
        adaptee.jButton4_actionPerformed(e);
    }
}


class MainFrme_jButton3_actionAdapter implements ActionListener {
    private MainFrme adaptee;
    MainFrme_jButton3_actionAdapter(MainFrme adaptee) {
        this.adaptee = adaptee;
    }

    public void actionPerformed(ActionEvent e) {
        adaptee.jButton3_actionPerformed(e);
    }
}


class MainFrme_jButton2_actionAdapter implements ActionListener {
    private MainFrme adaptee;
    MainFrme_jButton2_actionAdapter(MainFrme adaptee) {
        this.adaptee = adaptee;
    }

    public void actionPerformed(ActionEvent e) {
        adaptee.jButton2_actionPerformed(e);
    }
}


class MainFrme_jButton1_actionAdapter implements ActionListener {
    private MainFrme adaptee;
    MainFrme_jButton1_actionAdapter(MainFrme adaptee) {
        this.adaptee = adaptee;
    }

    public void actionPerformed(ActionEvent e) {
        adaptee.jButton1_actionPerformed(e);
    }
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜亚洲福利老司机| 国产精品77777| 久久国产精品露脸对白| 成人不卡免费av| 91精品久久久久久蜜臀| 国产精品色噜噜| 日韩高清电影一区| 色婷婷久久一区二区三区麻豆| 91精品在线免费观看| 亚洲色图19p| 国产精品1区2区| 日韩一区二区三区免费看| 1区2区3区欧美| 国产精品538一区二区在线| 欧美喷潮久久久xxxxx| 亚洲色欲色欲www| 国产一区二区福利| 日韩欧美亚洲另类制服综合在线 | 欧美女孩性生活视频| 国产精品网站导航| 久久精品国产成人一区二区三区| 欧美伊人精品成人久久综合97 | 免费成人av在线播放| 欧美三级欧美一级| 亚洲男人天堂av| av网站一区二区三区| 国产嫩草影院久久久久| 国产一区二区三区在线观看免费| 欧美一级免费大片| 日韩国产在线观看一区| 欧美日韩精品一二三区| 亚洲福利视频一区二区| 欧美日韩中文一区| 婷婷亚洲久悠悠色悠在线播放| 欧美性色欧美a在线播放| 玉足女爽爽91| 欧美性xxxxx极品少妇| 亚洲一区二区三区中文字幕在线 | 国产美女久久久久| 久久一二三国产| 国产真实乱偷精品视频免| 精品少妇一区二区三区免费观看 | 日韩欧美自拍偷拍| 日韩高清在线电影| 欧美成人综合网站| 国产在线播放一区三区四| 精品国产精品一区二区夜夜嗨| 韩国欧美国产1区| 欧美经典一区二区| 99re这里都是精品| 亚洲不卡一区二区三区| 欧美精品三级日韩久久| 黄页视频在线91| 中文字幕第一区第二区| 色偷偷成人一区二区三区91| 亚洲国产一区二区三区| 日韩欧美国产一区二区三区 | 韩国中文字幕2020精品| 国产午夜亚洲精品羞羞网站| av中文字幕不卡| 亚洲永久精品大片| 91精品国产综合久久国产大片| 久久国产精品99久久人人澡| 久久久久青草大香线综合精品| 成人短视频下载| 午夜伦理一区二区| 久久久精品欧美丰满| 日本韩国欧美在线| 另类欧美日韩国产在线| 国产精品久久久久久久久免费相片 | 亚洲成av人在线观看| 欧美成人女星排名| 99vv1com这只有精品| 久久精品国产999大香线蕉| 国产日产精品一区| 欧美三级日韩三级| 成人午夜看片网址| 日韩成人精品视频| 亚洲欧美日韩久久| 精品国产第一区二区三区观看体验| 91色|porny| 国产在线精品一区二区三区不卡| 亚洲精品国产精品乱码不99| www久久久久| 欧美日韩国产欧美日美国产精品| 国产精品影视天天线| 午夜精品在线视频一区| 亚洲欧美自拍偷拍| 精品欧美黑人一区二区三区| 在线影视一区二区三区| 国产久卡久卡久卡久卡视频精品| 亚洲成av人**亚洲成av**| 国产精品欧美经典| 精品国产乱码久久久久久夜甘婷婷 | 99亚偷拍自图区亚洲| 蜜桃免费网站一区二区三区| 一区二区国产盗摄色噜噜| 久久久亚洲精品石原莉奈| 3751色影院一区二区三区| 97超碰欧美中文字幕| 国产成人精品在线看| 国产一区二区视频在线| 日韩avvvv在线播放| 一区二区三区欧美| 国产精品国产自产拍高清av| 久久久影视传媒| 精品乱人伦一区二区三区| 在线电影国产精品| 欧美色图一区二区三区| 色先锋aa成人| 91精品91久久久中77777| 不卡av电影在线播放| 粉嫩嫩av羞羞动漫久久久| 久99久精品视频免费观看| 日本aⅴ免费视频一区二区三区| 午夜免费欧美电影| 同产精品九九九| 亚洲bt欧美bt精品| 性感美女极品91精品| 亚洲成a人v欧美综合天堂下载| 亚洲曰韩产成在线| 香蕉乱码成人久久天堂爱免费| 一区二区三区中文免费| 亚洲精品视频免费看| 樱桃国产成人精品视频| 亚洲在线一区二区三区| 亚洲成人第一页| 三级影片在线观看欧美日韩一区二区| 一区二区视频在线看| 亚洲一区二区三区四区不卡| 亚洲综合免费观看高清完整版| 亚洲综合免费观看高清在线观看| 亚洲综合免费观看高清完整版| 亚洲福利一二三区| 日本在线不卡视频| 老司机精品视频线观看86| 国产一区在线观看视频| 国产成人自拍网| 91看片淫黄大片一级在线观看| 色婷婷国产精品| 9191精品国产综合久久久久久| 日韩午夜精品视频| 国产肉丝袜一区二区| 亚洲乱码国产乱码精品精98午夜 | 日本精品免费观看高清观看| 在线观看日韩国产| 欧美一区二区三区视频在线观看| 欧美成人一区二区三区| 日本一区二区三区dvd视频在线| 日韩毛片在线免费观看| 午夜欧美一区二区三区在线播放| 麻豆精品一区二区三区| 成人永久aaa| 欧美乱妇15p| 国产欧美一区二区精品秋霞影院| 国产精品久久久久永久免费观看 | 欧美精品欧美精品系列| 精品国产污网站| 亚洲男女一区二区三区| 日韩av电影天堂| 99国产精品久久久久| 欧美久久久影院| 中文字幕一区二区三区色视频 | 欧美日韩精品一区二区| 久久精品一二三| 亚洲主播在线播放| 国产成人精品1024| 欧美日韩一区视频| 国产欧美精品一区二区色综合| 亚洲自拍偷拍综合| 国产精品1024| 91精品国产综合久久久久久久 | 亚洲欧美激情在线| 黄色小说综合网站| 欧美三级日韩在线| 亚洲同性同志一二三专区| 美女性感视频久久| 欧美在线三级电影| 中文字幕乱码亚洲精品一区| 日韩成人精品在线观看| 色偷偷久久人人79超碰人人澡| 精品国产乱码久久久久久1区2区| 亚洲二区视频在线| 91丨九色丨黑人外教| 国产欧美精品国产国产专区| 蜜桃av一区二区| 欧美日韩国产综合一区二区| 一区在线中文字幕| 国产一本一道久久香蕉| 欧美一区二区三区在线观看| 一区二区三区高清| 99精品国产热久久91蜜凸| 国产日韩v精品一区二区| 国内精品免费在线观看| 欧美一级搡bbbb搡bbbb| 日韩国产在线一| 777午夜精品视频在线播放| 亚洲综合丁香婷婷六月香| 色婷婷久久久综合中文字幕 | 欧美一区二区三级|