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

📄 openaccount.java

📁 大型数据库课程设计源码
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
package com.vbank.operate;

import com.vbank.tool.CharToString;
import com.vbank.db.*;
import java.awt.GridBagLayout;
import javax.swing.JPanel;
import java.awt.Dimension;
import javax.swing.JLabel;
import java.awt.Rectangle;
import javax.swing.BorderFactory;
import java.awt.Color;
import javax.swing.border.SoftBevelBorder;
import javax.swing.border.TitledBorder;
import java.awt.Font;
import java.sql.SQLException;
import java.util.Vector;

import javax.swing.JOptionPane;
import javax.swing.JTextField;
import javax.swing.JComboBox;
import javax.swing.JPasswordField;
import javax.swing.JCheckBox;
import javax.swing.JButton;
import javax.swing.border.BevelBorder;

public class OpenAccount extends JPanel {

	private static final long serialVersionUID = 1L;
	private JPanel jPanel = null;
	private JLabel jLabel = null;
	private JTextField jTextField = null;
	private JLabel jLabel1 = null;
	private JComboBox jComboBox = null;
	private JLabel jLabel2 = null;
	private JTextField jTextField1 = null;
	private JLabel jLabel3 = null;
	private JPasswordField jPasswordField = null;
	private JLabel jLabel4 = null;
	private JCheckBox jCheckBox = null;
	private JLabel jLabel5 = null;
	private JPasswordField jPasswordField1 = null;
	private JPanel jPanel1 = null;
	private JLabel jLabel6 = null;
	private JTextField jTextField2 = null;
	private JLabel jLabel7 = null;
	private JComboBox jComboBox1 = null;
	private JLabel jLabel8 = null;
	private JTextField jTextField3 = null;
	private JLabel jLabel9 = null;
	private JTextField jTextField4 = null;
	private JLabel jLabel10 = null;
	private JTextField jTextField5 = null;
	private JPanel jPanel2 = null;
	private JButton jButton = null;
	private JButton jButton1 = null;
	private JLabel jLabel11 = null;
	private JPasswordField jPasswordField2 = null;
	private JLabel jLabel12 = null;
	private JPasswordField jPasswordField3 = null;
	private JLabel jLabel13 = null;
	private JTextField jTextField6 = null;
	private JLabel jLabel14 = null;
	private JTextField jTextField7 = null;
	/**
	 * This is the default constructor
	 */
	public OpenAccount() {
		super();
		initialize();
	}

	/**
	 * This method initializes this
	 * 
	 * @return void
	 */
	private void initialize() {
		this.setSize(567, 443);
		this.setLayout(null);
		this.setBorder(BorderFactory.createTitledBorder(BorderFactory.createCompoundBorder(BorderFactory.createLineBorder(Color.lightGray, 5), new SoftBevelBorder(SoftBevelBorder.RAISED)), "\u5f00\u901a\u5e10\u6237", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.BELOW_TOP, new Font("Dialog", Font.BOLD, 14), Color.green));
		this.add(getJPanel(), null);
		this.add(getJPanel1(), null);
		this.add(getJPanel2(), null);
	}

	/**
	 * This method initializes jPanel	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJPanel() {
		if (jPanel == null) {
			jLabel12 = new JLabel();
			jLabel12.setBounds(new Rectangle(169, 185, 89, 26));
			jLabel12.setText("确认密码:");
			jLabel11 = new JLabel();
			jLabel11.setBounds(new Rectangle(258, 72, 90, 31));
			jLabel11.setText("确认密码:");
			jLabel5 = new JLabel();
			jLabel5.setBounds(new Rectangle(169, 156, 85, 24));
			jLabel5.setText("借记卡密码:");
			jLabel4 = new JLabel();
			jLabel4.setBounds(new Rectangle(8, 154, 90, 25));
			jLabel4.setText("办理借记卡:");
			jLabel3 = new JLabel();
			jLabel3.setBounds(new Rectangle(5, 75, 47, 29));
			jLabel3.setText("密码:");
			jLabel2 = new JLabel();
			jLabel2.setBounds(new Rectangle(8, 116, 73, 30));
			jLabel2.setText("存款金额:");
			jLabel1 = new JLabel();
			jLabel1.setBounds(new Rectangle(254, 30, 97, 32));
			jLabel1.setText("选择帐号类型:");
			jLabel = new JLabel();
			jLabel.setBounds(new Rectangle(4, 28, 56, 27));
			jLabel.setText("帐号:");
			jPanel = new JPanel();
			jPanel.setLayout(null);
			jPanel.setBounds(new Rectangle(11, 29, 547, 218));
			jPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED), "\u5e10\u6237\u8d44\u6599", TitledBorder.CENTER, TitledBorder.DEFAULT_POSITION, new Font("\u5b8b\u4f53", Font.PLAIN, 14), Color.red));
			jPanel.add(jLabel, null);
			jPanel.add(getJTextField(), null);
			jPanel.add(jLabel1, null);
			jPanel.add(getJComboBox(), null);
			jPanel.add(jLabel2, null);
			jPanel.add(getJTextField1(), null);
			jPanel.add(jLabel3, null);
			jPanel.add(getJPasswordField(), null);
			jPanel.add(jLabel4, null);
			jPanel.add(getJCheckBox(), null);
			jPanel.add(jLabel5, null);
			jPanel.add(getJPasswordField1(), null);
			jPanel.add(jLabel11, null);
			jPanel.add(getJPasswordField2(), null);
			jPanel.add(jLabel12, null);
			jPanel.add(getJPasswordField3(), null);
		}
		return jPanel;
	}

	/**
	 * This method initializes jTextField	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getJTextField() {
		if (jTextField == null) {
			jTextField = new JTextField();
			jTextField.setBounds(new Rectangle(67, 28, 162, 30));
		}
		return jTextField;
	}

	/**
	 * This method initializes jComboBox	
	 * 	
	 * @return javax.swing.JComboBox	
	 */
	private JComboBox getJComboBox() {
		if (jComboBox == null) {
			jComboBox = new JComboBox();
			jComboBox.addItem("活期");
			jComboBox.addItem("定期存单");
			jComboBox.addItem("定期一本通");
			jComboBox.addItem("定活两便");
			jComboBox.addItem("信用卡");
			jComboBox.setBounds(new Rectangle(360, 28, 128, 32));
			jComboBox.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {
					//System.out.println("actionPerformed()"); // TODO Auto-generated Event stub actionPerformed()
					if(jComboBox.getSelectedItem().equals("信用卡")) {
						jLabel2.setText("最大借款额:");
						jLabel4.setVisible(false);
						jLabel5.setVisible(false);
						jLabel12.setVisible(false);
						jCheckBox.setVisible(false);
						jPasswordField1.setVisible(false);
						jPasswordField3.setVisible(false);
						//jTextField1.setEnabled(false);
					}else {jLabel2.setText("存款金额:");
					jLabel4.setVisible(true);
					jLabel5.setVisible(true);
					jLabel12.setVisible(true);
					jCheckBox.setVisible(true);
					jPasswordField1.setVisible(true);
					jPasswordField3.setVisible(true);
					}
				}
			});
		}
		return jComboBox;
	}
	public void paint() {
		
	}
	/**
	 * This method initializes jTextField1	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getJTextField1() {
		if (jTextField1 == null) {
			jTextField1 = new JTextField();
			jTextField1.setBounds(new Rectangle(82, 115, 142, 31));
		}
		return jTextField1;
	}

	/**
	 * This method initializes jPasswordField	
	 * 	
	 * @return javax.swing.JPasswordField	
	 */
	private JPasswordField getJPasswordField() {
		if (jPasswordField == null) {
			jPasswordField = new JPasswordField();
			jPasswordField.setBounds(new Rectangle(59, 77, 167, 27));
		}
		return jPasswordField;
	}

	/**
	 * This method initializes jCheckBox	
	 * 	
	 * @return javax.swing.JCheckBox	
	 */
	private JCheckBox getJCheckBox() {
		if (jCheckBox == null) {
			jCheckBox = new JCheckBox();
			jCheckBox.setBounds(new Rectangle(108, 159, 21, 21));
			jCheckBox.addItemListener(new java.awt.event.ItemListener() {
				public void itemStateChanged(java.awt.event.ItemEvent e) {
					if(jCheckBox.isSelected()) {
						jPasswordField1.setEditable(true);
						jPasswordField3.setEditable(true);// TODO Auto-generated Event stub itemStateChanged()
					}else {
						jPasswordField1.setEditable(false);
						jPasswordField3.setEditable(true);
					}
				}
			});
		}
		return jCheckBox;
	}

	/**
	 * This method initializes jPasswordField1	
	 * 	
	 * @return javax.swing.JPasswordField	
	 */
	private JPasswordField getJPasswordField1() {
		if (jPasswordField1 == null) {
			jPasswordField1 = new JPasswordField();
			jPasswordField1.setBounds(new Rectangle(262, 156, 146, 24));
			jPasswordField1.setEditable(false);
		}
		return jPasswordField1;
	}

	/**
	 * This method initializes jPanel1	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJPanel1() {
		if (jPanel1 == null) {
			jLabel10 = new JLabel();
			jLabel10.setBounds(new Rectangle(8, 116, 53, 25));
			jLabel10.setText("电话:");
			jLabel9 = new JLabel();
			jLabel9.setBounds(new Rectangle(6, 87, 51, 26));
			jLabel9.setText("住址:");
			jLabel8 = new JLabel();
			jLabel8.setBounds(new Rectangle(8, 54, 87, 28));

⌨️ 快捷键说明

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