Closed Thread
Results 1 to 6 of 6

Thread: Help With Implementing Message Boxes

  1. #1
    mosesff is offline Newbie
    Join Date
    Jun 2008
    Posts
    8
    Rep Power
    0

    Help With Implementing Message Boxes

    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.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Mar 2008
    Location
    The North Pole
    Posts
    13,174
    Blog Entries
    13
    Rep Power
    114

    Re: Help With Implementing Message Boxes

    You'll need to create custom forms for data entry. Also, don't forget to use CODE tags when writing your code.

    Quote Originally Posted by Jordan View Post
    Good members, like yourself, stick around and post for ages to come!
    Mr. Xav | Blog | Forums

  4. #3
    mosesff is offline Newbie
    Join Date
    Jun 2008
    Posts
    8
    Rep Power
    0

    Re: Help With Implementing Message Boxes

    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.

  5. #4
    Join Date
    Mar 2008
    Location
    The North Pole
    Posts
    13,174
    Blog Entries
    13
    Rep Power
    114

    Re: Help With Implementing Message Boxes

    Yes, with custom dialog boxes you can do whatever you want with them.

    Quote Originally Posted by Jordan View Post
    Good members, like yourself, stick around and post for ages to come!
    Mr. Xav | Blog | Forums

  6. #5
    mosesff is offline Newbie
    Join Date
    Jun 2008
    Posts
    8
    Rep Power
    0

    Re: Help With Implementing Message Boxes

    Quote Originally Posted by Xav View Post
    Yes, with custom dialog boxes you can do whatever you want with them.
    I'll try it out thanks.

  7. #6
    mosesff is offline Newbie
    Join Date
    Jun 2008
    Posts
    8
    Rep Power
    0

    Re: Help With Implementing Message Boxes

    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!).

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 05-20-2011, 06:38 AM
  2. Saving message from message queue into file.
    By Mumble in forum C and C++
    Replies: 7
    Last Post: 07-23-2010, 09:56 AM
  3. Edit Boxes
    By acce55 in forum C and C++
    Replies: 3
    Last Post: 07-27-2009, 12:09 PM
  4. Boxes?
    By RobSoftware in forum Software Development Tools
    Replies: 3
    Last Post: 06-29-2007, 07:34 AM
  5. 3D Boxes
    By Jordan in forum Technology Ramble
    Replies: 8
    Last Post: 08-26-2006, 10:21 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts