import java.applet.*;
import javax.swing.*;
import java.awt.event.*;
import java.awt.event.*;
import java.awt.*;
import BanqueDeux.*;
public class BanqueATM extends Applet implements ActionListener {
String msg = **;
Label greetingdeux = new Label("+++++BARCLAYS BANK+++++++-******©- 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 *************");
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 = "BarclaysBanking";
String message = "Thank you, Please Wait, Your Mini Statement Is Being Prined.";
JOptionPane.showMessageDialog(null, message, title,
JOptionPane.INFORMATION_MESSAGE);
}
});
}
}
package BanqueDeux;
import javax.swing.*;
import java.applet.*;
import java.awt.*;
public class HelloJava extends Applet {
{
JFrame frame = new JFrame("WelcomeToBarclaysBank");
JLabel label = new JLabel("Thank You, Welcome, Please Insert Your Card", JLabel.CENTER );
frame.getContentPane().add( label );
frame.setSize( 300, 300 );
frame.setVisible( true );
}
}
These are code for 2 of my classes in which I am creating a GUI Bank Interface, could anyone tell me how I would implement multiple message boxes by clicking the buttons in BanqueATM class, also if possible more complex message boxes which allow verification and allow entering data.
I have worked 3 full days on this to get to no conclusion, help would be appreciated, I should state I am a begginer to Java programming.
Thanks.
Last edited by mosesff; 06-20-2008 at 03:58 PM.
Could you expand on that? If i create custom forms can they be implemented on button click events to enter data?
Je trouve Java est chouette. Thanks, I'll research on it.
Last edited by mosesff; 06-21-2008 at 06:49 PM.
I updated my code too add a second class with a dialog but it doesn't work let alone in the main class.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(); { } }
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!).
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks