package Lesson0524;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import javax.swing.*;
public class cz extends JFrame{
private JButton cx;
private JButton qk;
private JButton xg;
private JButton tk;
private JButton zz;
private JPanel mb;
public cz(){
}
public cz(String title){
super(title);
cx = new JButton("查询余额");
cx.addActionListener(new ActionListener(){
@Override
public void actionPerformed(ActionEvent arg0) {
// TODO 自动生成的方法存根
sh();
new ye("余额");
}
});
qk = new JButton("取款");
qk.addActionListener(new ActionListener(){
@Override
public void actionPerformed(ActionEvent arg0) {
// TODO 自动生成的方法存根
sh();
}
});
xg = new JButton("修改密码");
tk = new JButton("退卡");
zz = new JButton("转账");
mb = new JPanel();
mb.add(cx);
mb.add(qk);
mb.add(xg);
mb.add(tk);
mb.add(zz);
this.add(mb);
this.setBounds(400,400,200,200);
this.setVisible(true);
}
public void denglu() throws ClassNotFoundException, SQLException{
Class.forName("com.mysql.jdbc.Driver");
String url="jdbc:mysql://localhost:3306/atm?characterEncoding=utf-8";
String user="root";
String pass="root";
Connection conn = DriverManager.getConnection(url,user,pass);
Statement stmt = conn.createStatement();
String sql="select balance from account ";
ResultSet rs = stmt.executeQuery(sql);
}
public void sh(){
this.dispose();
}
}
最近下载更多
彳亍彳亍彳亍 LV1
2024年5月23日
13155750125 LV1
2023年12月10日
2546434210 LV1
2023年6月14日
543666826 LV34
2022年3月12日
方寸月光 LV1
2021年12月22日
123567_111 LV1
2021年11月26日
尹恒yingying LV18
2021年10月12日
srl2881552 LV10
2021年8月11日
最代码安逸 LV15
2021年7月12日
无名氏111 LV33
2021年7月10日
最近浏览更多
DoustrongWU LV5
2月16日
微信网友_7306808533962752
2024年12月22日
暂无贡献等级
jposjqp
2024年6月5日
暂无贡献等级
hfffff LV1
2024年6月3日
彳亍彳亍彳亍 LV1
2024年5月23日
DEFNXKJ LV2
2024年4月18日
akittyboy LV9
2024年3月22日
求学的熊猫 LV11
2023年12月25日
lshlsh
2023年12月25日
暂无贡献等级
13155750125 LV1
2023年12月10日

