package atm;
import java.awt.*;
import javax.swing.*;
import java.awt.BorderLayout;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
/**
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2008</p>
*
* <p>Company: </p>
*
* @author not attributable
* @version 1.0
*/
public class Entrance
extends JFrame {
private String username;
private String userpassword;
private float money;
JPanel contentPane;
JLabel jLabel1 = new JLabel();
JLabel jLabel2 = new JLabel();
JButton jButton1 = new JButton();
JTextField jTextField1 = new JTextField();
JPasswordField jPasswordField1 = new JPasswordField();
public Entrance() {
try {
setDefaultCloseOperation(EXIT_ON_CLOSE);
jbInit();
}
catch (Exception exception) {
exception.printStackTrace();
}
}
/**
* Component initialization.
*
* @throws java.lang.Exception
*/
private void jbInit() throws Exception {
contentPane = (JPanel) getContentPane();
contentPane.setLayout(null);
setSize(new Dimension(346, 283));
setTitle("ATM");
jLabel1.setText("账号");
jLabel1.setBounds(new Rectangle(44, 72, 51, 30));
jLabel2.setText("密码");
jLabel2.setBounds(new Rectangle(44, 123, 52, 30));
jButton1.setBounds(new Rectangle(107, 172, 138, 25));
jButton1.setText("OK");
jButton1.addActionListener(new Entrance_jButton1_actionAdapter(this));
jTextField1.setBounds(new Rectangle(107, 76, 138, 32));
jPasswordField1.setBounds(new Rectangle(107, 119, 138, 31));
contentPane.setBackground(new Color(244, 132, 0));
contentPane.add(jLabel1);
contentPane.add(jLabel2);
contentPane.add(jTextField1);
contentPane.add(jPasswordField1);
contentPane.add(jButton1);
}
public void jButton1_actionPerformed(ActionEvent e) {
String x=jTextField1.getText().trim();
char [] y=jPasswordField1.getPassword();
}
class Entrance_jButton1_actionAdapter
implements ActionListener {
private Entrance adaptee;
Entrance_jButton1_actionAdapter(Entrance adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jButton1_actionPerformed(e);
}
}