package atm_client_lj52boy;
import java.awt.Button;
import java.awt.Color;
import java.awt.Font;
import java.awt.Frame;
import java.awt.Label;
import java.awt.Panel;
import java.awt.TextField;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.DataOutputStream;
import java.io.IOException;
public class Frame_Transfer extends Frame {
Frame_Transfer frame = this;
// 进入主界面后的组件
Button btn_Reset = new Button("重输帐号");
Button btn_OK = new Button("确认");
Button btn_Back = new Button("返回");
Button btn_Back2 = new Button("返回");
TextField txt_AccountId = new TextField();
TextField txt_TransferMoney = new TextField();
Panel pal_Transfer = new Panel();
Label lbl_EntryId = new Label("对方帐号");
Label lbl_EntryMoney = new Label("转帐金额");
Label lbl_AccountId = new Label();
Label lbl_AccountName = new Label();
Label lbl_Money = new Label();
Button btn_CheckOk = new Button("确认转帐");
Panel pal_TransferCheck = new Panel();
public Frame_Transfer() {
this.addWindowListener(new WindowAdapter() {
public void windowClosed(WindowEvent e) {
System.exit(0);
}
public void windowClosing(WindowEvent e) {
frame.dispose();
}
});
this.setTitle("ATM自动取款机-lj52boy");
this.setSize(400, 320);
int width = Toolkit.getDefaultToolkit().getScreenSize().width
- this.getSize().width;
int height = Toolkit.getDefaultToolkit().getScreenSize().height
- this.getSize().height;
this.setLocation((int) (width / 2), (int) (height / 2));
lbl_EntryId.setSize(100, 20);
lbl_EntryId.setLocation(50, 150);
lbl_EntryId.setForeground(new Color(0, 102, 204));
lbl_EntryId.setFont(new Font("Default",Font.BOLD, 20));
lbl_EntryMoney.setSize(100, 20);
lbl_EntryMoney.setLocation(50, 190);
lbl_EntryMoney.setForeground(new Color(0, 102, 204));
lbl_EntryMoney.setFont(new Font("Default",Font.BOLD, 20));
txt_AccountId.setSize(160, 25);
txt_AccountId.setLocation(140, 150);
txt_AccountId.setFont(new Font("Default",Font.BOLD, 20));
txt_TransferMoney.setSize(160, 25);
txt_TransferMoney.setLocation(140, 190);
txt_TransferMoney.setFont(new Font("Default",Font.BOLD, 20));
btn_Reset.setSize(60, 30);
btn_Reset.setLocation(320, 150);
btn_Reset.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
System.out.println("重输帐号");
txt_AccountId.setText("");
txt_TransferMoney.setText("");
}
});
btn_OK.setSize(60, 30);
btn_OK.setLocation(320, 100);
btn_OK.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
System.out.println("确认");
DataOutputStream os;
try {
os = new DataOutputStream(Var.SOCKET.getOutputStream());
os.writeInt(41);
os.writeUTF(txt_AccountId.getText());
os.writeDouble(Double.valueOf(txt_TransferMoney.getText()));
os.flush();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
});
btn_Back.setSize(60, 30);
btn_Back.setLocation(320, 250);
btn_Back.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
System.out.println("返回");
Var.ATM_FRAME.removeAll();
Var.ATM_FRAME.add((new Frame_Index()).pal_Index);
}
});
pal_Transfer.add(this.btn_Reset);
pal_Transfer.add(this.btn_OK);
pal_Transfer.add(this.btn_Back);
pal_Transfer.add(this.txt_AccountId);
pal_Transfer.add(this.txt_TransferMoney);
pal_Transfer.add(this.lbl_EntryId);
pal_Transfer.add(this.lbl_EntryMoney);
pal_Transfer.setLayout(null);
pal_Transfer.setSize(400, 300);
pal_Transfer.setLocation(0, 0);
lbl_AccountId.setSize(100, 30);
lbl_AccountId.setLocation(140, 100);
lbl_AccountId.setForeground(new Color(0, 102, 204));
lbl_AccountId.setFont(new Font("Default",Font.BOLD, 20));
lbl_AccountName.setSize(100, 30);
lbl_AccountName.setLocation(140, 140);
lbl_AccountName.setForeground(new Color(0, 102, 204));
lbl_AccountName.setFont(new Font("Default",Font.BOLD, 20));
lbl_Money.setSize(100, 30);
lbl_Money.setLocation(150, 180);
lbl_Money.setForeground(new Color(0, 102, 204));
lbl_Money.setFont(new Font("Default",Font.BOLD, 20));
btn_CheckOk.setSize(60, 30);
btn_CheckOk.setLocation(320, 100);
btn_CheckOk.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
System.out.println("确认转帐");
DataOutputStream os;
try {
os = new DataOutputStream(Var.SOCKET.getOutputStream());
os.writeInt(42);
os.flush();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
});
btn_Back2.setSize(60, 30);
btn_Back2.setLocation(320, 250);
btn_Back2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
System.out.println("返回");
Var.ATM_FRAME.removeAll();
Var.ATM_FRAME.add((new Frame_Index()).pal_Index);
}
});
pal_TransferCheck.setLayout(null);
pal_TransferCheck.setSize(400, 300);
pal_TransferCheck.setLocation(0, 0);
pal_TransferCheck.add(this.lbl_AccountId);
pal_TransferCheck.add(this.lbl_AccountName);
pal_TransferCheck.add(this.lbl_Money);
pal_TransferCheck.add(this.btn_CheckOk);
pal_TransferCheck.add(this.btn_Back2);
this.add(this.pal_Transfer);
this.add(this.pal_TransferCheck);
this.setLayout(null);
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
LI_JAVA_ATM_CLIENT.rar (46个子文件)
LI_JAVA_ATM_CLIENT
.project 394B
bin
atm_client_lj52boy
Frame_Transfer$1.class 874B
Frame_Transfer$6.class 1KB
Frame_Transfer$3.class 2KB
Frame_GetMoney$4.class 1KB
Frame_AmendPassWord$3.class 2KB
Var.class 621B
Frame_GetMoney.class 3KB
Frame_AmendPassWord$1.class 904B
Frame_Transfer$2.class 1KB
Frame_Index$6.class 2KB
Frame_Login$2.class 748B
Frame_Login$1.class 1KB
Frame_Index$1.class 856B
Frame_Transfer$4.class 1KB
Frame_GetMoney$3.class 2KB
Frame_GetMoney$1.class 874B
ATM_Main.class 622B
Frame_Login$4.class 1KB
Frame_GetMoney$2.class 988B
Frame_Transfer$5.class 1KB
Frame_Transfer.class 4KB
Frame_AmendPassWord$2.class 1KB
Frame_Message$1.class 868B
Frame_Login$3.class 885B
Frame_AmendPassWord$4.class 1KB
Frame_Index$2.class 1KB
Frame_Message.class 2KB
Frame_Index$3.class 1KB
Frame_Index$5.class 1KB
Frame_Login.class 5KB
Thread_GetServer.class 3KB
Frame_Index$4.class 1KB
Frame_Index.class 2KB
Frame_Message$2.class 1KB
Frame_AmendPassWord.class 3KB
src
atm_client_lj52boy
Frame_AmendPassWord.java 4KB
Frame_Transfer.java 6KB
Var.java 234B
Thread_GetServer.java 3KB
ATM_Main.java 275B
Frame_Login.java 5KB
Frame_GetMoney.java 3KB
Frame_Message.java 2KB
Frame_Index.java 4KB
.classpath 232B
共 46 条
- 1
资源评论
- Ray_Chiu2012-09-27程序做得不错,美中不足是注释写的太少了
- lucy不会飞2015-01-31不错,不错,比较清晰?
lj52boy
- 粉丝: 0
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 用DAC0832产生锯齿波电压_单片机C语言实例(纯C语言源代码).zip
- [其他类别]SimpleID 0.6.5_simpleid-codepub.rar
- [图片动画]Singapore v0.10.0_singapore-0.10.0.rar
- NiceChord 好和弦:Wiwi寫給想做音樂的你,厲害的人都在用!超過80個寫歌、編曲創作原理.pdf
- IMG_20240420_234000.jpg
- [其他类别]PHP Web admin System v1.0_webadmin_php.rar
- 实用密码锁_单片机C语言实例(纯C语言源代码).zip
- 女孩写字.zip
- 请问更好发挥和规范化风格化发货
- JAVA社区网络服务系统(源代码+论文).rar
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功