第一范文网 - 专业文章范例文档资料分享平台

JAVA课程设计-银行存取管理系统(所有代码)

来源:用户分享 时间:2025/11/23 12:54:14 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

p1.add(label1); p1.add(yue); p1.add(label2);

p2.setBounds(300,80,100,50); p2.add(button1); add(p1); add(p2);

i=Denlu.chaxun(); if(i>=0) {

yue.setText(String.valueOf(i)); } else {

JOptionPane.showMessageDialog(Zhuye.z,\系统故障,请稍后在试!\ }

setVisible(true); }

public class BHandler implements ActionListener { public void actionPerformed (ActionEvent event) { dispose(); } } }

类:Xiugai

package zhuce;

import javax.swing.*;

import zhuce.Zhuanzhang.BHandler;

import java.awt.*;

import java.awt.event.*;

public class Xiugai extends JDialog{ TextField ymima=new TextField(20); TextField xmima=new TextField(20); public Xiugai(JFrame m,String s){ super(m,s);

setBounds(400,250,400,300); setVisible(true); setModal(false);

21

setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); setResizable(false);

setLayout(null); //不用任何布局 JLabel label1=new JLabel(\修改密码\

label1.setFont(new Font(\宋体\ JLabel label2=new JLabel(\原密码:\

label2.setFont(new Font(\宋体\ JLabel label3=new JLabel(\新密码:\

label3.setFont(new Font(\宋体\

JButton button1=new JButton(\确认\ JButton button2=new JButton(\取消\ BHandler h=new BHandler(); button1.addActionListener(h); button2.addActionListener(h);

JPanel p1=new JPanel(); JPanel p2=new JPanel(); JPanel p3=new JPanel(); JPanel p4=new JPanel(); p1.setBounds(0,0,250,60); p1.add(label1);

p2.setBounds(25,60,300,40); p2.add(label2); p2.add(ymima);

p3.setBounds(25,100,300,60); p3.add(label3); p3.add(xmima);

p4.setBounds(35,160,300,40); p4.add(button1); p4.add(button2); add(p1); add(p2); add(p3); add(p4);

setVisible(true); }

public class BHandler implements ActionListener { public void actionPerformed (ActionEvent event) {

int i;

if(event.getActionCommand()==\确认

\ {

22

i=Denlu.gaimi(ymima.getText(), xmima.getText()); if(i==1) {

JOptionPane.showMessageDialog(Zhuye.z,\修改密码成功,请重新登录!\

dispose(); Zhuye.close(); }

else if(i==2)

JOptionPane.showMessageDialog(Zhuye.z,\原密码错误!\ else {

JOptionPane.showMessageDialog(Zhuye.z,\系统故障!\ dispose(); } }

else if(event.getActionCommand()==\确认

\

JOptionPane.showMessageDialog(Zhuye.z,\请补全信息!\ else

dispose(); } } }

类:Zc.java

package zhuce;

import javax.swing.*;

import java.awt.*;

import java.awt.event.*;

public class Zc extends JFrame{

JFrame z=new JFrame(\银行管理系统\ TextField name=new TextField(20); TextField sex=new TextField(20); TextField kahao=new TextField(20); TextField mima=new TextField(20); TextField phone=new TextField(20); public Zc(){

23

Zoc(); }

public void Zoc(){

z.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE); z.setBounds(210,110,700,600); z.setVisible(true); z.setResizable(false);

Container c=getContentPane(); //必须继承JFrame类 c.setLayout(null);

c.setBackground(Color.blue);//不采用任何布局方式 z.add(c);

JLabel label1=new JLabel(\客户注册\JLabel label2=new JLabel(\姓 名:\JLabel label3=new JLabel(\性 别:\JLabel label4=new JLabel(\卡 号:\JLabel label5=new JLabel(\密 码:\JLabel label6=new JLabel(\手机号:\

label1.setFont(new Font(\label1.setForeground(Color.WHITE);

label2.setFont(new Font(\label2.setForeground(Color.WHITE);

label3.setFont(new Font(\label3.setForeground(Color.WHITE);

label4.setFont(new Font(\label4.setForeground(Color.WHITE);

label5.setFont(new Font(\label5.setForeground(Color.WHITE);

label6.setFont(new Font(\label6.setForeground(Color.WHITE);

ImageIcon img1=new ImageIcon(\ImageIcon img2=new ImageIcon(\JButton button1=new JButton(\button1.setBackground(Color.blue); JButton button2=new JButton(\

24

JAVA课程设计-银行存取管理系统(所有代码).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c6vs518nt1y0zn001pb9w_6.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top