Code:
import java.applet.*;
import javax.swing.*;
import java.awt.event.*;
import java.awt.event.*;
import java.awt.*;
import java.awt.Container;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
import javax.swing.JApplet;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
import BanqueDeux.*;
//Bibliogaphy/Bibliographie- JavaExamplesInANutshell- O-REILY
//Bibliography/Bibliographie- Google- Search: AppletObjects
public class BanqueATM extends Applet{
public static BanqueDeuxExt BD = new BanqueDeuxExt();
public static Frame myFrame = new Frame();
Label greetingdeux = new Label("+++++BARCLAYS BANK+++++++-MNashir©- International =");
Label greetingune = new Label("------------------------Ask a Banker For Your Pin-----------------------------");
Label greeting = new Label("Welcome To Barclays Bank");
TextField enterName = new TextField(5);
Button clickButton = new Button("(PIN)-Click Here To Enter PIN");
Label greetingtrois = new Label("***+++Withdraw Amount With Receipt+++++****");
TextField retirermontant = new TextField(8);
Button clique = new Button("Click");
Label greetingjeur = new Label("**+++++++++Change Your PIN+++++++++++**");
TextField visualisersolde = new TextField(8);
Button Buttoner = new Button("Confirm");
Label grting = new Label("**++Print Mini Statementr++**");
Button cliquedix = new Button("Print Statement");
Label ecole = new Label("++++++++++**Withdraw With No Receipt***++++++++++");
TextField eshol = new TextField(6);
Button clinuyi = new Button("Click");
Label greetingx = new Label("-----------------------------------------------");
Label greetingg = new Label("------------------------------------------------");
Label ifrancais = new Label("EMail a Banker at customerservices@barclays.co.uk");
Label u = new Label("E-mail for programme help at 'mohammadnashir@hotmail.com");
public void init()
{
setBackground(Color.lightGray);
add(greetingdeux);
add(greetingune);
add(greeting);
add(enterName);
add(clickButton);
add(greetingtrois);
add(retirermontant);
add(clique);
add(greetingjeur);
add(visualisersolde);
add(Buttoner);
add(grting);
add(cliquedix);
add(ecole);
add(eshol);
add(clinuyi);
add(greetingx);
add(greetingg);
add(ifrancais);
add(u);
Frame appletFrame = new Frame("EnterYourPIN");
appletFrame.setLayout(new GridLayout(1,0));
appletFrame.resize(300, 100);
appletFrame.show();
Applet HelloJava = new HelloJava();
appletFrame.add(HelloJava);
HelloJava.init();
HelloJava.start();
cliquedix.addActionListener( new ActionListener() {
public void actionPerformed(ActionEvent evt) {
String title = "Barclays Banking";
String message = "Thank you, Please Wait, Your Mini Statement is being Printed.";
JOptionPane.showMessageDialog(null, message, title,
JOptionPane.INFORMATION_MESSAGE);
}
});
}
}
/**
* Write a description of class BanqueDeuxExt here.
*
* @author (your name)
* @version (a version number or a date)
*/
import java.awt.event.*;
import java.awt.*;
public class BanqueDeuxExt implements ActionListener {
public static BanqueATM ba = new BanqueATM();
public static Frame myFrame = new Frame();
public static BanqueDeuxExt clique = new BanqueDeuxExt();
{
}
}
I updated my code too add a second class with a dialog but it doesn't work let alone in the main class.
HELP! An example would be good if possible.
(I would ignore the fact there is so many 'imports' in the main class its just me wanting to not have ANY MORE ERRORS!).
Bookmarks
Algorithms and Data Structures
Java tutorials
Algorithms Forum