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

📄 moneydia.java

📁 银行管理系统,根据实习的要求以及参考现实中的银行数据库系统
💻 JAVA
字号:
package bank;
import javax.swing.*;
import com.borland.jbcl.layout.XYLayout;
import com.borland.jbcl.layout.*;
import java.awt.Font;
import java.awt.event.WindowEvent;
import java.awt.event.WindowAdapter;
import java.awt.Color;
import java.awt.SystemColor;
import java.sql.Statement;
import java.sql.Connection;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

//用户操作界面。。。。。。
public class MoneyDia extends JFrame{
  public MoneyDia(String accountID,String branchname,String pswd) {
    try {
      this.accountID=accountID;
      this.branchname=branchname;
      this.pswd=pswd;

        jbInit();


    }
    catch (Exception ex) {
      ex.printStackTrace();
    }
    addWindowListener(new WindowAdapter(){
            public void windowClosing(WindowEvent e){
              System.exit(0);
            }

          }

           );

  }
   static String accountID;
   static String branchname;
   static String pswd;
     CheckBalancePane check;
     LoanPanel     loan;
     GetMoneyPanel que;
     SetMoneyPanel  cun;
     TranferPanel  tra;
     PayForPanel   pay;
  private void jbInit() throws Exception {
    this.getContentPane().setLayout(xYLayout1);
    xYLayout1.setWidth(590);
    xYLayout1.setHeight(418);
    jTabbedPane1.setBackground(Color.pink);

    jTabbedPane1.setFont(new java.awt.Font("Dialog", Font.PLAIN, 12));
   loan=new LoanPanel(accountID,branchname,pswd);
   que=new GetMoneyPanel(accountID,branchname,pswd);
   cun=new SetMoneyPanel(accountID,branchname,pswd);
   tra=new TranferPanel(accountID,branchname,pswd);
   pay=new PayForPanel(accountID,branchname,pswd);//调用参数到面板类
   check=new CheckBalancePane(accountID,branchname,pswd);
    this.getContentPane().setBackground(Color.pink);
    this.setForeground(Color.pink);
    jLabel1.setText("");
    jLabel2.setText("");
    jLabel3.setBounds(new Rectangle(472, 19, 269, 378));
    jLabel4.setText("");

    jLabel4.setIcon(new ImageIcon("33.jpg"));
    jLabel5.setBackground(new Color(236, 205, 241));
    jLabel5.setFont(new java.awt.Font("宋体", Font.BOLD, 14));
    jLabel5.setForeground(Color.blue);
    jLabel5.setText(
        "  存  钱        取  钱     查询余额     转 帐        贷 款     " +
        "    还 钱");
    jButton1.setBackground(Color.pink);
    jButton1.setFont(new java.awt.Font("Dialog", Font.PLAIN, 12));
    jButton1.setText("退出程序");
    jButton1.addActionListener(new MoneyDia_jButton1_actionAdapter(this));
    jTabbedPane1.add(cun, new ImageIcon("1.gif"));
    jTabbedPane1.add(que,new ImageIcon("ssd.gif"));
    jTabbedPane1.add(check, new ImageIcon("3.gif"));
    jTabbedPane1.add(tra,new ImageIcon("a.gif"));
     jTabbedPane1.add(loan,new ImageIcon("sda.gif"));
    jTabbedPane1.add(pay,new ImageIcon("sd.gif"));
    this.getContentPane().add(jButton1, new XYConstraints(596, 370, -1, 29));
    this.getContentPane().add(jLabel4, new XYConstraints(570, 39, 267, 175));
    this.getContentPane().add(jLabel3, new XYConstraints(0, 0, -1, -1));
    this.getContentPane().add(jLabel5, new XYConstraints(3, 4, 590, 29));
    this.getContentPane().add(jTabbedPane1, new XYConstraints(2, 39, 576, 362));
    System.out.println(accountID);
  }

  XYLayout xYLayout1 = new XYLayout();
  JTabbedPane jTabbedPane1 = new JTabbedPane();
  JLabel jLabel1 = new JLabel();
  JLabel jLabel2 = new JLabel();
  JLabel jLabel3 = new JLabel();
  JLabel jLabel4 = new JLabel();
  JLabel jLabel5 = new JLabel();
  JButton jButton1 = new JButton();
  public void jButton1_actionPerformed(ActionEvent e) {
      System.exit(0);
  }
}

class MoneyDia_jButton1_actionAdapter
    implements ActionListener {
  private MoneyDia adaptee;
  MoneyDia_jButton1_actionAdapter(MoneyDia adaptee) {
    this.adaptee = adaptee;
  }

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

⌨️ 快捷键说明

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