package view;
import java.awt.BorderLayout;
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import java.awt.Window.Type;
import java.sql.Connection;
import java.sql.ResultSet;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JButton;
import javax.swing.LayoutStyle.ComponentPlacement;
import javax.swing.border.TitledBorder;
import dao.accountDao;
import model.account;
import util.DateUtil;
import util.DbUtil;
import util.StringUtil;
import javax.swing.UIManager;
import java.awt.Color;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JComboBox;
import javax.swing.JPasswordField;
import java.awt.event.ActionListener;
import java.math.BigDecimal;
import java.awt.event.ActionEvent;
import java.awt.Font;
import javax.swing.JTextField;
public class OutComeJFrame extends JFrame implements ActionListener {
private JPanel contentPane;
private JButton bt_sure;
private JButton bt_break;
private JComboBox userName_jcb;
private DbUtil dbutil=new DbUtil();
private accountDao accountdao=new accountDao();
private String username;
private JTextField moneyTxt;
private JButton bt_reflash;
/**
* Create the frame.
*/
public OutComeJFrame(String username) {
this.username=username;
setResizable(false);
setTitle("\u6B22\u8FCE\u4F7F\u7528\u94F6\u884CATM\u673A\uFF01");
setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
//setBounds(100, 100, 761, 344);
setSize(761,344);
setLocationRelativeTo(null);
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
JPanel panel = new JPanel();
panel.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "\u8F6C\u8D26\u7A97\u53E3", TitledBorder.CENTER, TitledBorder.TOP, null, new Color(0, 0, 0)));
JButton button_3 = new JButton("");
JButton button_4 = new JButton("");
bt_reflash = new JButton("");
bt_reflash.addActionListener(this);
bt_sure = new JButton("");
bt_sure.addActionListener(this);
bt_break = new JButton("");
bt_break.addActionListener(this);
JButton button_1 = new JButton("");
JButton button_2 = new JButton("");
JButton button_7 = new JButton("");
GroupLayout gl_contentPane = new GroupLayout(contentPane);
gl_contentPane.setHorizontalGroup(
gl_contentPane.createParallelGroup(Alignment.TRAILING)
.addGroup(gl_contentPane.createSequentialGroup()
.addGap(28)
.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)
.addComponent(bt_break, GroupLayout.PREFERRED_SIZE, 91, GroupLayout.PREFERRED_SIZE)
.addComponent(button_1, GroupLayout.PREFERRED_SIZE, 91, GroupLayout.PREFERRED_SIZE)
.addComponent(button_2, GroupLayout.PREFERRED_SIZE, 91, GroupLayout.PREFERRED_SIZE)
.addComponent(button_7, GroupLayout.PREFERRED_SIZE, 91, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(ComponentPlacement.RELATED, 33, Short.MAX_VALUE)
.addComponent(panel, GroupLayout.PREFERRED_SIZE, 442, GroupLayout.PREFERRED_SIZE)
.addGap(38)
.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)
.addComponent(button_3, GroupLayout.PREFERRED_SIZE, 91, GroupLayout.PREFERRED_SIZE)
.addComponent(bt_sure, GroupLayout.PREFERRED_SIZE, 91, GroupLayout.PREFERRED_SIZE)
.addComponent(button_4, GroupLayout.PREFERRED_SIZE, 91, GroupLayout.PREFERRED_SIZE)
.addComponent(bt_reflash, GroupLayout.PREFERRED_SIZE, 91, GroupLayout.PREFERRED_SIZE))
.addGap(22))
);
gl_contentPane.setVerticalGroup(
gl_contentPane.createParallelGroup(Alignment.TRAILING)
.addGroup(gl_contentPane.createSequentialGroup()
.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)
.addGroup(gl_contentPane.createSequentialGroup()
.addGap(34)
.addComponent(button_3, GroupLayout.PREFERRED_SIZE, 40, GroupLayout.PREFERRED_SIZE)
.addGap(26)
.addComponent(button_4, GroupLayout.PREFERRED_SIZE, 40, GroupLayout.PREFERRED_SIZE)
.addGap(18)
.addComponent(bt_reflash, GroupLayout.PREFERRED_SIZE, 40, GroupLayout.PREFERRED_SIZE)
.addGap(29)
.addComponent(bt_sure, GroupLayout.PREFERRED_SIZE, 40, GroupLayout.PREFERRED_SIZE))
.addGroup(gl_contentPane.createSequentialGroup()
.addGap(18)
.addComponent(panel, GroupLayout.PREFERRED_SIZE, 252, GroupLayout.PREFERRED_SIZE)))
.addContainerGap(35, Short.MAX_VALUE))
.addGroup(gl_contentPane.createSequentialGroup()
.addContainerGap(40, Short.MAX_VALUE)
.addComponent(button_7, GroupLayout.PREFERRED_SIZE, 40, GroupLayout.PREFERRED_SIZE)
.addGap(18)
.addComponent(button_2, GroupLayout.PREFERRED_SIZE, 40, GroupLayout.PREFERRED_SIZE)
.addGap(18)
.addComponent(button_1, GroupLayout.PREFERRED_SIZE, 40, GroupLayout.PREFERRED_SIZE)
.addGap(26)
.addComponent(bt_break, GroupLayout.PREFERRED_SIZE, 40, GroupLayout.PREFERRED_SIZE)
.addGap(43))
);
JLabel lblNewLabel = new JLabel("\u8D26\u53F7\uFF1A");
JLabel label = new JLabel("\u8BF7\u8F93\u5165\u8981\u8F6C\u5165\u7684\u8D26\u53F7\u548C\u91D1\u989D\uFF1A");
label.setFont(new Font("宋体", Font.PLAIN, 13));
userName_jcb = new JComboBox();
JLabel label_1 = new JLabel("\u91D1\u989D\uFF1A");
moneyTxt = new JTextField();
moneyTxt.setColumns(10);
JLabel lblNewLabel_1 = new JLabel("\u66F4\u6B63\u300B");
JLabel label_2 = new JLabel("\u300A\u8FD4\u56DE");
JLabel lblNewLabel_2 = new JLabel("\u786E\u8BA4\u300B");
GroupLayout gl_panel = new GroupLayout(panel);
gl_panel.setHorizontalGroup(
gl_panel.createParallelGroup(Alignment.LEADING)
.addGroup(gl_panel.createSequentialGroup()
.addGroup(gl_panel.createParallelGroup(Alignment.LEADING)
.addGroup(gl_panel.createSequentialGroup()
.addGap(116)
.addComponent(label))
.addGroup(gl_panel.createSequentialGroup()
.addGap(80)
.addGroup(gl_panel.createParallelGroup(Alignment.LEADING)
.addGroup(gl_panel.createSequentialGroup()
.addComponent(lblNewLabel)
.addGap(18)
.addComponent(userName_jcb, GroupLayout.PREFERRED_SIZE, 213, GroupLayout.PREFERRED_SIZE))
.addGroup(gl_panel.createSequentialGroup()
.addComponent(label_1)
.addGap(18)
.addComponent(moneyTxt, GroupLayout.PREFERRED_SIZE, 193, GroupLayout.PREFERRED_SIZE)))))
.addContainerGap(83, Short.MAX_VALUE))
.addGroup(Alignment.TRAILING, gl_panel.createSequentialGroup()
.addContainerGap(376, Short.MAX_VALUE)
.addComponent(lblNewLabel_1))
.addGroup(gl_panel.createSequentialGroup()
.addComponent(label_2)
.addPreferredGap(ComponentPlacement.RELATED, 340, Short.MAX_VALUE)
.addComponent(lblNewLabel_2))
);
gl_panel.setVerticalGroup(
gl_panel.createParallelGroup(Alignment.LEADING)
.addGroup(gl_panel.createSequentialGroup()
.addGap(25)
.addComponent(label)
.addGap(18)
.addGroup(gl_panel.createParallelGroup(Alignment.BASELINE)
.addComponent(lblNewLabel)
.addComponent(userName_jcb, GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE))
.addGap(26)
.addGroup(gl_panel.createParallelGroup(Alignment.BASELINE)
.addComponent(label_1)
.addComponent(moneyTxt, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(ComponentPlacement.UNRELATED)
.addComponent(lblNewLabel_1)
.addPreferredGap(ComponentPlacement.RELATED, 50, Short.MAX_VALUE)
.addGroup(gl_panel.createParallelGroup(Alignment.BASELINE)
.addComponent(label_2)
.addComponent(lblNewLabel_2
没有合适的资源?快使用搜索试试~ 我知道了~
JavaGUI+JDBC模拟ATM项目
共34个文件
class:16个
java:14个
prefs:1个
需积分: 44 18 下载量 82 浏览量
2018-10-30
16:10:37
上传
评论
收藏 1000KB ZIP 举报
温馨提示
采用Java windowbuilderPRO工具搭建的swing界面+JDBC驱动连接MYSQL仿银行ATM柜员机项目
资源推荐
资源详情
资源评论
收起资源包目录
ATMmachine.zip (34个子文件)
ATMmachine
.project 386B
src
view
IncomeJFrame.java 8KB
OutComeJFrame.java 10KB
SelectRemainMoneyJFrame.java 7KB
MainJFrame.java 8KB
OutMoneyJFrame.java 9KB
ModifyPasswordJFrame.java 9KB
LoginJFrame.java 9KB
HistoryJFrame.java 9KB
OtherOutMoneyJFrame.java 9KB
model
account.java 963B
dao
accountDao.java 6KB
util
DbUtil.java 1KB
StringUtil.java 517B
DateUtil.java 489B
.settings
org.eclipse.jdt.core.prefs 598B
jdbc
mysql-connector-java-5.1.44-bin.jar 976KB
.classpath 380B
bin
view
HistoryJFrame.class 8KB
IncomeJFrame.class 8KB
LoginJFrame$1.class 722B
SelectRemainMoneyJFrame.class 7KB
ModifyPasswordJFrame.class 8KB
OutComeJFrame.class 9KB
OtherOutMoneyJFrame.class 8KB
HistoryJFrame$1.class 846B
MainJFrame.class 7KB
OutMoneyJFrame.class 8KB
LoginJFrame.class 8KB
model
account.class 1KB
dao
accountDao.class 5KB
util
StringUtil.class 653B
DbUtil.class 2KB
DateUtil.class 1011B
共 34 条
- 1
资源评论
Java程序狗Duncan
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功