+ Reply to Thread
Results 1 to 6 of 6

Thread: Help With Implementing Message Boxes

  1. #1
    Newbie mosesff is an unknown quantity at this point
    Join Date
    Jun 2008
    Posts
    8

    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 05:58 PM.

  2. #2
    Xav
    Xav is offline
    Code Slinger Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav's Avatar
    Join Date
    Mar 2008
    Location
    The North Pole
    Posts
    13,210
    Blog Entries
    13

    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

  3. #3
    Newbie mosesff is an unknown quantity at this point
    Join Date
    Jun 2008
    Posts
    8

    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 08:49 PM.

  4. #4
    Xav
    Xav is offline
    Code Slinger Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav's Avatar
    Join Date
    Mar 2008
    Location
    The North Pole
    Posts
    13,210
    Blog Entries
    13

    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

  5. #5
    Newbie mosesff is an unknown quantity at this point
    Join Date
    Jun 2008
    Posts
    8

    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.

  6. #6
    Newbie mosesff is an unknown quantity at this point
    Join Date
    Jun 2008
    Posts
    8

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

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

     

Similar Threads

  1. New Place To Submit Your Forum Or Message Board
    By TVDinner in forum MarketPlace
    Replies: 15
    Last Post: 06-12-2008, 06:58 AM
  2. Internet connection message in mfc
    By cpplover in forum C and C++
    Replies: 4
    Last Post: 05-30-2008, 12:55 PM
  3. problem linking tripple combo boxes
    By monalisa_smile in forum AJAX
    Replies: 3
    Last Post: 11-17-2007, 11:24 AM
  4. Help with Application Logic for .NET 2.0
    By hoser2001 in forum C# Programming
    Replies: 5
    Last Post: 08-03-2007, 10:08 AM
  5. 3D Boxes
    By Jordan in forum Technology Ramble
    Replies: 8
    Last Post: 08-26-2006, 12:21 PM

Bookmarks

Bookmarks

     
        Algorithms and Data Structures

        Java tutorials

        Algorithms Forum

Posting Permissions

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