当前位置: 首页 > 编程日记 > 正文

Java项目:银行管理系统+文档Java基础Gui(java+Gui)

源码获取:博客首页 "资源" 里下载!

功能介绍:

登录、打印、取款、改密、转账、查询、挂失、存款、退卡

服务模块:

public class atmFrame extends JFrame {private JPanel contentPane;private user user;
//	private LoginFrame lf;/*** Launch the application.*/public static void main(String[] args) {EventQueue.invokeLater(new Runnable() {public void run() {try {atmFrame frame = new atmFrame(null);frame.setVisible(true);} catch (Exception e) {e.printStackTrace();}}});}/*** Create the frame.*/public atmFrame(final String name) {setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);setBounds(100, 100, 518, 434);contentPane = new JPanel();setTitle(name);contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));setLocationRelativeTo(null);setContentPane(contentPane);contentPane.setLayout(null);JButton queryButton = new JButton("\u67E5\u8BE2");queryButton.setBounds(99, 101, 113, 27);contentPane.add(queryButton);queryButton.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent e) {user = ExecuteSQL.query(name);DecimalFormat df = new DecimalFormat( "0.00 "); JOptionPane.showMessageDialog(null,"您的账户名:"+user.getName()+"\n"+"当前余额:¥"+user.getbalance()+"\n","信息提示",JOptionPane.INFORMATION_MESSAGE);		}});JButton depositButton = new JButton("\u5B58\u6B3E");depositButton.setBounds(99, 223, 113, 27);contentPane.add(depositButton);depositButton.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent e) {// TODO Auto-generated method stubdepositFrame df = new depositFrame(name);setVisible(false);df.setVisible(true);}});JButton withdrawButton = new JButton("\u53D6\u6B3E");withdrawButton.setBounds(288, 101, 113, 27);contentPane.add(withdrawButton);withdrawButton.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent e) {// TODO Auto-generated method stubwithdrawFrame wf = new withdrawFrame(name);setVisible(false);wf.setVisible(true);}});JButton transferButton = new JButton("\u8F6C\u8D26");transferButton.setBounds(288, 223, 113, 27);contentPane.add(transferButton);transferButton.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent e) {// TODO Auto-generated method stubtransferFrame wf = new transferFrame(name);setVisible(false);wf.setVisible(true);}});}}

登录模块:

public class LoginFrame extends JFrame {private JPanel contentPane;private JTextField u_name_Field;private JPasswordField u_password_field;private user user;//登录事件监听器class loginAction implements ActionListener {public void actionPerformed(ActionEvent e) {// TODO Auto-generated method stubuser = ExecuteSQL.check(u_name_Field.getText(), u_password_field.getText());if (user.getName() != null) {if (user.getPassword().equals(u_password_field.getText())) {try {atmFrame frame = new atmFrame(user.getName());frame.setTitle(user.getName());frame.setVisible(true);setVisible(false);} catch (Exception ex) {ex.printStackTrace();}} else {JOptionPane.showMessageDialog(null, "密码不正确!请重新输入");u_name_Field.setText("");u_password_field.setText("");}} else {JOptionPane.showMessageDialog(null, "找不到该用户,请先注册!");u_name_Field.setText("");u_password_field.setText("");}}}//注册事件监听器class signAction implements ActionListener{public void actionPerformed(ActionEvent e) {// TODO Auto-generated method stubSignFrame frame = new SignFrame();frame.setVisible(true);setVisible(false);}}/*** Launch the application.*/public static void main(String[] args) {EventQueue.invokeLater(new Runnable() {public void run() {try {LoginFrame frame = new LoginFrame();frame.setVisible(true);} catch (Exception e) {e.printStackTrace();}}});}/*** Create the frame.*/public LoginFrame() {setTitle("\u7F51\u4E0A\u94F6\u884C");setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);setBounds(100, 100, 506, 385);contentPane = new JPanel();setLocationRelativeTo(null);contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));setContentPane(contentPane);contentPane.setLayout(null);JButton LoginButton = new JButton("\u767B\u5F55");LoginButton.setFont(new Font("新宋体", Font.BOLD, 20));LoginButton.setBounds(92, 214, 120, 37);contentPane.add(LoginButton);LoginButton.addActionListener(new loginAction());JButton signButton = new JButton("\u6CE8\u518C");signButton.setFont(new Font("新宋体", Font.BOLD, 20));signButton.setBounds(283, 214, 113, 37);contentPane.add(signButton);signButton.addActionListener(new signAction());JLabel u_nameLabel = new JLabel("\u7528\u6237\u540D\uFF1A");u_nameLabel.setFont(new Font("新宋体", Font.BOLD, 18));u_nameLabel.setBounds(92, 49, 88, 37);contentPane.add(u_nameLabel);JLabel u_passwordLabel_1 = new JLabel("\u5BC6\u7801\uFF1A");u_passwordLabel_1.setFont(new Font("新宋体", Font.BOLD, 18));u_passwordLabel_1.setBounds(92, 130, 88, 27);contentPane.add(u_passwordLabel_1);u_name_Field = new JTextField();u_name_Field.setBounds(184, 57, 157, 29);contentPane.add(u_name_Field);u_name_Field.setColumns(10);u_password_field = new JPasswordField();u_password_field.setBounds(184, 133, 157, 27);contentPane.add(u_password_field);JLabel lblNewLabel = new JLabel("\u7528\u6237\u6307\u5357");lblNewLabel.setForeground(Color.RED);lblNewLabel.setBounds(402, 307, 72, 31);contentPane.add(lblNewLabel);}
}

收回框设置:

public class withdrawFrame extends JFrame {private JPanel contentPane;private JTextField outputField;private com.shao.model.user user_query;private com.shao.model.user user_modMoney;/*** Create the frame.*/public withdrawFrame(final String name) {setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);setBounds(100, 100, 450, 300);contentPane = new JPanel();setTitle(name);setLocationRelativeTo(null);contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));setContentPane(contentPane);contentPane.setLayout(null);JLabel lblNewLabe = new JLabel("\u53D6\u6B3E\u91D1\u989D\uFF1A");lblNewLabe.setFont(new Font("新宋体", Font.BOLD, 20));lblNewLabe.setBounds(84, 75, 117, 38);contentPane.add(lblNewLabe);outputField = new JTextField();outputField.setBounds(199, 84, 117, 24);contentPane.add(outputField);outputField.setColumns(10);JButton OKButton = new JButton("\u786E\u5B9A");OKButton.setFont(new Font("新宋体", Font.BOLD, 15));OKButton.setBounds(84, 159, 113, 27);contentPane.add(OKButton);OKButton.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent e) {// TODO Auto-generated method stubSystem.out.println("withdrawFrame.withdrawFrame(...).new ActionListener() {...}.actionPerformed()"+outputField.getText());if (Float.parseFloat(outputField.getText()) < 100000) {if(Float.parseFloat(outputField.getText())%100==0) {user_query = ExecuteSQL.query(name);if (user_query.getbalance() > Double.parseDouble(outputField.getText())) {double temp = user_query.getbalance() - Double.parseDouble(outputField.getText());DecimalFormat df = new DecimalFormat( "0.00 ");   int i = ExecuteSQL.modifyMoney(name, temp);	if(i>0){setVisible(false);atmFrame frame = new atmFrame(name);frame.setVisible(true);JOptionPane.showMessageDialog(null, "取钱交易成功!"+"\n" + "剩余余额为:" + df.format(temp));}else{JOptionPane.showMessageDialog(null, "取钱交易失败!"+"\n" + "剩余余额为:" + df.format(temp));}} else {JOptionPane.showMessageDialog(null, "余额不足,请重新输入!" + "\n" + "当前余额为:" + user_query.getbalance());outputField.setText("");}}else {JOptionPane.showMessageDialog(null, "系统不支持非100元整钞,请重新输入!");outputField.setText("");}} else {JOptionPane.showMessageDialog(null, "输入金额大于100000,请重新输入!");outputField.setText("");}}});JButton backButton_1 = new JButton("\u8FD4\u56DE");backButton_1.setFont(new Font("新宋体", Font.BOLD, 15));backButton_1.setBounds(233, 159, 113, 27);contentPane.add(backButton_1);backButton_1.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent e) {atmFrame af = new atmFrame(name);setVisible(false);af.setVisible(true);			}		});JLabel remindLabel = new JLabel("*\u5355\u7B14\u6700\u5927\u53EF\u53D610000");remindLabel.setForeground(Color.RED);remindLabel.setBounds(199, 126, 138, 18);contentPane.add(remindLabel);}}

源码获取:博客首页 "资源" 里下载!

相关文章:

ie旋转滤镜Matrix

旋转一个元素算是一个比较常见的需求了吧&#xff0c;在支持CSS3的浏览器中可以使用transform很容易地实现&#xff0c;这里有介绍&#xff1a;http://www.css88.com/archives/2168&#xff0c;这里有演示http://www.css88.com/tool/css3Preview/Transform.html&#xff0c;就不…

音频(3):iPod Library Access Programming Guide:Introduction

NextIntroduction介绍iPod库访问&#xff08;iPod Library Access&#xff09;让应用程序可以播放用户的歌曲、有声书、和播客。这个API设计使得基本播放变得非常简单&#xff0c;同时也支持高级的搜索和播放控制功能。iPod library access 通过打开iOS允许的音乐相关的广阔范围…

【2019/4/30】周进度报告

冲刺可以推迟了&#xff0c;但这不妨碍知识储备&#xff08;另外这周看了看梦断代码&#xff0c;感觉还是很有意思的一本书&#xff09;。 第七周所花时间约9个小时代码量700多行&#xff0c;主要是阅读代码为主&#xff08;框架内代码&#xff09;博客量1篇了解到的知识点 1.y…

关于 智能指针 的线程安全问题

先说结论&#xff0c;智能指针都是非线程安全的。 多线程调度智能指针 这里案例使用的是shared_ptr&#xff0c;其他的unique_ptr或者weak_ptr的结果都是类似的&#xff0c;如下多线程调度代码&#xff1a; #include <memory> #include <thread> #include <v…

Java项目:无库版商品管理系统(java+Gui+文档)

源码获取&#xff1a;博客首页 "资源" 里下载&#xff01; 功能介绍&#xff1a; 添加商品、修改商品、删除商品、进货出货、查看流水、注册 登录业务处理&#xff1a; public class LoginView extends JFrame implements ComponentListener{private JPanel center…

LTE QCI分类 QoS

http://blog.163.com/gzf_lte/blog/static/20840310620130140057204/ http://blog.163.com/gzf_lte/blog/static/208403106201301403652527/ http://blog.sina.com.cn/u/1731932381 lte2010 QCI (QoS Class Identifier)同时应用于GBR和Non-GBR承载。一个QCI是一个值&#xff0…

CSS 单行溢出文本只显示部分内容

.cc-item div { width:175px; text-overflow:clip;  //该属性适用于IE6,IE7 max-width:175px;  //该属性适用于IE8&#xff0c;FF,谷歌}

Audio声音

转载于:https://www.cnblogs.com/kubll/p/10799187.html

Rocksdb Ribbon Filter : 结合 XOR-filter 以及 高斯消元算法 实现的 高效filter

文章目录前言XOR-filter 实现原理xor filter 的构造原理xor filter 构造总结XOR-filter 和 ADD-filter对比XOR-filter 在计算上的优化Ribbon filter高斯消元法总结参考前言 还是起源于前几天的Rocksdb meetup&#xff0c;其中Peter C. Dillinger 这位大佬分享了自己为rocksdb实…

Java项目:无库版银行管理系统(java+Gui+文档)

源码获取&#xff1a;博客首页 "资源" 里下载&#xff01; 功能介绍&#xff1a; 注册用户、编辑用户、删除用户、存取款、查看流水 存入业务处理&#xff1a; public class depositFrame extends JFrame {private JPanel contentPane;private JTextField inputFiel…

iptables-save和iptables-restore

iptables-save用来把当前的规则存入一个文件里以备iptables-restore使用。它的使用很简单&#xff0c;只有两个参数&#xff1a;iptables-save [-c] [-t table]参数-c的作用是保存包和字节计数器的值。这可以使我们在重启防火墙后不丢失对包和字节的统计。带-c参数的iptables-s…

代码之美——Doom3源代码赏析2

http://www.csdn.net/article/2013-01-17/2813778-the-beauty-of-doom3-source-code/2 摘要&#xff1a;Dyad作者、资深C工程师Shawn McGrathz在空闲时翻看了Doom3的源代码&#xff0c;发出了这样的惊叹&#xff1a;“这是我见过的最整洁、最优美的代码&#xff01;”“Doom 3的…

什么是JavaBean

按着Sun公司的定义&#xff0c;JavaBean是一个可重复使用的软件组件。实际上JavaBean是一种Java类&#xff0c;通过封装属性和方法成为具有某种功能或者处理某个业务的对象&#xff0c;简称bean。由于javabean是基于java语言的&#xff0c;因此javabean不依赖平台&#xff0c;具…

关于 linux io_uring 性能测试 及其 实现原理的一些探索

文章目录先看看性能AIO 的基本实现io_ring 使用io_uring 基本接口liburing 的使用io_uring 非poll 模式下 的实现io_uring poll模式下的实现io_uring 在 rocksdb 中的应用总结参考先看看性能 io_uring 需要内核版本在5.1 及以上才支持&#xff0c;liburing的编译安装 很简单&am…

添加引用方式抛出和捕获干净的WebService异常

转载&#xff1a;http://www.cnblogs.com/ahdung/p/3953431.html 说明&#xff1a;【干净】指的是客户端在捕获WebService&#xff08;下称WS&#xff09;抛出的异常时&#xff0c;得到的ex.Message就是WS方法中抛出的异常消息&#xff0c;不含任何“杂质”。 前提&#xff1a;…

Java项目:车租赁管理系统(java+Gui+文档)

源码获取&#xff1a;博客首页 "资源" 里下载&#xff01; 功能介绍&#xff1a; 登陆界面、管理员界面、用户界面、汽车租赁文档 系统主页&#xff1a; SuppressWarnings("serial") public class SystemMainView extends JFrame implements ActionListe…

TFS中的测试计划(十)

现在有一个测试用例&#xff0c;用来测试登录&#xff0c;并且有两组测试数据。打开团队项目的web门户的测试。新建一个测试计划。命名为测试计划1添加完测试计划后&#xff0c;就可以向这个计划里添加测试用例了&#xff0c;选择登录测试。运行测试&#xff0c;就会生成下图左…

跟着Rocskdb 学 存储引擎:读写链路的代码极致优化

文章目录1. 读链路1.1 FileIndexer1.1.1 LevelDB sst查找实现1.1.2 Rocksdb FileIndexer实现1.2 PinnableSlice 减少内存拷贝1.3 Cache1.3.1 LRU Cache1.3.2 Clock Cache1.4 ThreadLocalPtr 线程私有存储1.4.1 version系统1.4.2 C thread_local vs ThreadLocalPtr1.4.3 ThreadL…

Java项目:人力管理系统(java+Gui+文档)

源码获取&#xff1a;博客首页 "资源" 里下载&#xff01; 功能介绍&#xff1a; 角色员工、管理员&#xff0c;员工信息表&#xff0c;查询、更新&#xff0c;修改&#xff0c;移除、添加 用户管理控制层&#xff1a; /*** author yy*/Controller RequestMapping(…

senfile函数实例的运行过程截图

//要传输的文件内容如下所示&#xff1a; 启动服务器&#xff0c;等待客户端连接&#xff08;在同一台主机上模拟的&#xff09; 客户端远程登录&#xff0c;这里是在本地登录 这个要注意一点就是远程登陆的时候一定要带上端口号不然连接失败&#xff01;&#xff01;转载于:ht…

马年计划2014-2-21

新的一年到来了&#xff01; 刚刚过去的一年里&#xff0c;我已浪费很多时光&#xff01; 新年新气象&#xff0c;为避免重蹈覆辙&#xff0c;此时我必须要立个新年计划&#xff0c;马年计划&#xff01; &#xff08;1&#xff09;一天必须做两道ACM题。 &#xff08;2&#…

java jsp页面如何添加C标签

在https://mvnrepository.com/找两个jar包分别是&#xff1a; <dependency> <groupId>javax.servlet.jsp.jstl</groupId> <artifactId>jstl-api</artifactId> <version>1.2</version> </dependency> <dependency> <g…

如何用 ndctl/ipmctl 管理工具 配置不同访问模式的pmem设备

文章目录1 PMEM 底层架构2 PMEM 逻辑架构3 ipmctl 创建 不同模式的 region3.1 安装3.2 创建AppDirect mode的region3.3 创建 Memory Mode模式3.4 创建 混合模式3.5 查看创建的结果4 ndctl 创建不同类型的 namespaces4.1 安装4.2 创建/删除 一个任意类型的namespace4.3 指定类型…

[PHP]php基础练习题学习随笔

1、解释一下PHP中常量、变量、可变变量并举例说明&#xff1b;超级全局变量有哪些&#xff1f; 常量是单个值的标识符&#xff08;名称&#xff09;&#xff0c;通过define()设置&#xff0c;在脚本中无法改变该值&#xff0c;常量自动全局。<?php #对大小写不敏感为true&a…

Java项目:进销存系统(java+Gui)

源码获取&#xff1a;博客首页 "资源" 里下载&#xff01; 功能介绍&#xff1a; 基本信息管理、库存管理、销售管理、订单管理、日志管理、供应商基本信息、员工基本信息、商品信息、入库管理、出库管理、剩余库存 商品信息控制层&#xff1a; /*** <p>* 前…

IDP申请直到软件上架流程 - iOS

第一&#xff1a;IDP的申请 1.先在iPhone DevCenter上注册成为iphone developer 2.加入iPhone开发程序项目iPhone Developer Program Apply Now 3.打算收费的都建议选择99刀那个&#xff0c;QTY是个数的意思。1就好。 4.选择地区china&#xff0c;(很早之前没有china&#xff0…

灭霸—个人冲刺(4)

灵魂三问&#xff1a;昨天做了什么&#xff1f;1.手机验证码 2h 2.整体框架搭建尝试 2h 目标任务量&#xff1a;100% 完成任务量&#xff1a;100% 今天要做什么&#xff1f;1.数据库建立及连接 16h 遇到困难没有&#xff1f;2.整体框架搭建时因为连接服务器分为三类&#xf…

关于 Rocksdb 的 EnvWrapper 作用的小讨论

临下班前一位做引擎的小伙伴提了个小问题&#xff0c; Rocksdb 实现了非常多的Env backend 这一些backend 可以让用户根据自己需求创建不同 公共接口backend&#xff0c;来实现自己的文件操作或者公共线程池操作。 Env* env new rocksdb::HdfsEnv(FLAGS_hdfs) 问题是&#xf…

corepython第九章:文件和输入输出

学习笔记: OS模块代码示例: 1 import os2 for tmpdir in (/tmp,rc:\users\administrator\desktop):3 #如果存在括号里面的目录&#xff0c;则break4 if os.path.isdir(tmpdir):5 break6 #如果不存在&#xff0c;则tmpdir为空值&#xff0c;即False7 else:8 pri…

Java项目:学生管理系统(无库版)(java+打印控制台)

源码获取&#xff1a;博客首页 "资源" 里下载&#xff01; 功能介绍&#xff1a; 学生成绩管理系统成绩表 用户管理操作&#xff1a; /*** 用户管理操作*/ Controller RequestMapping("/user") public class UserController {Autowiredprivate UserServi…