全文预览

毕业论文:ATM机《Java语言程序设计》报告

上传者:徐小白 |  格式:doc  |  页数:30 |  大小:0KB

文档介绍
8;Р }Р public myKeyListener(JTextField jtf,int length){Р this.jtf = jtf;Р this.length = length;Р }Р public void keyTyped(KeyEvent e)Р {Р boolean b = Character.toString(e.getKeyChar()).matches("\\d");Р if(!b || jtf.getText().length() == length){Р e.consume();Р } Р }Р?}Р}Р2.AtmDemo.java//ATM卡号生成页面Р package client;Рimport java.awt.*;Рimport java.awt.event.*;Рimport java.io.*;Рimport .Socket;Рimport java.util.Calendar;Рimport .URL;Рimport javax.swing.*;Рpublic class AtmDemo extends JFrame implements ActionListener {Р JLabel jl1,jl2,jl3,jl4,jl5,jl6,jl7,jl8; Р JTextField jtf1,jtf2,jtf3;Р JPasswordField jpf1,jpf2;Р JButton jb1,jb2,jb3;Р JComboBox jcb;Р BufferedReader br;Р JLabel msg;Р Account account;Р int totalmoney=10000;Р int money;Р?Р public AtmDemo(){Р super("银行卡号开户");Р this.setLayout(null);

收藏

分享

举报
下载此文档