I have been given an assinment by a
Java teacher
to create a banking application where the first
screen will be the welcome to the program,
User Input of UserID & Password.
& an Submit & Cancel Button.
Once the Submit button is pressed the program
meeds to pull the UserID & Paswd from the
screen & compare it to information comtained
in a file.
If Ok go on to the next screen & iff not
refresh the screen & try again.
So far I have an ugly BUT working
applet.
How the heck do I take the userid/pswd
& compair it to a file?
HELP!!!
=======
import javax.swing.JOptionPane;
import javax.swing.JDialog;
import javax.swing.JButton;
import javax.swing.JRadioButton;
import javax.swing.ButtonGroup;
import javax.swing.JLabel;
import javax.swing.ImageIcon;
import javax.swing.BoxLayout;
import javax.swing.BorderFactory;
import javax.swing.border.Border;
import javax.swing.JTabbedPane;
import javax.swing.JPanel;
import javax.swing.JFrame;
import java.beans.*; //Property change stuff
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.text.*;
import java.awt.*; //for layout managers
import java.awt.event.*; //for action and window events
import java.net.URL;
import java.io.IOException;
public class BankingDemo extends JApplet //implements ActionListener
{
public void init()
{
Container contentPane = getContentPane();
contentPane.setLayout(new GridLayout( 6, 1 ));
//define the text labels
JLabel welcomelabel1 = new JLabel( "Welcome to Banking Application" );
welcomelabel1.setFont(new Font("Helvetica", Font.BOLD, 20));
JLabel welcomelabel2 = new JLabel( "Please Enter UserID (ione) & Password (ione)" );
JTextField mytf1 = new JTextField( "Enter your used ID here (ione)" );
JPasswordField mytf2 = new JPasswordField( "Write you Password here" );
JButton buttonSubmit = new JButton( " Submit " );
JButton buttonCancel = new JButton( " Cancel " );
contentPane.add(welcomelabel1);// display Welcome Label
contentPane.add(welcomelabel2);// display Welcome Label
contentPane.add(mytf1);// display userID field
contentPane.add(mytf2);// display passowrd field pane
contentPane.add(buttonSubmit);// display Submit button
contentPane.add(buttonCancel);// display Cancel button
}
}