Who wants to be a Millionaire ??? CODE???

hi
i'm tryin to make a basic game who wants to be a millionaire...i got the following..layout of the textfield textarea etc.. but i cant seem to use the vectors to store the questions from a txt file then transfer it over to the textarea box or radio buttons.... n how about the checking part??
anyone know where to find help or can help me??
thnks

That is the game frame:
// File:          GameFrame.java
// Purpose:          The window that appears when the player chooses to play the game
//                    This window shows the questions and answers and the amount being played for
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.Vector;
import java.io.*;
public class GameFrame extends JFrame implements ActionListener {
     private MainFrame frmMain;
     private Vector questionVector;
     private JTextField jtfquestions;
     private JButton btnCancel, btnPrevious, btnNext, btnSelect,btnStart;
     private JRadioButton jrba, jrbb, jrbc, jrbd;
     private ButtonGroup btg = new ButtonGroup();
     private JList score;
     private final String money []= {"15. 1000000","14. 500000","13. 250000","12. 125000","11. 64000","10. 32000","9. 16000","8. 8000","7. 4000","6. 2000","5. 1000","4. 500","3. 300","2. 200","1. 100"} ;
     public GameFrame(MainFrame mf)
     frmMain = mf;                    // Get a handle on caller
score=new JList (money);
score.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
     JPanel p1=new JPanel();
     ImageIcon logo=new ImageIcon ("millionaire.jpg");
     p1.add(new JLabel(logo));
     JPanel p2=new JPanel();     
                     p2.add(score);
        JPanel p5=new JPanel();
       p5.setLayout(new GridLayout(2,3,4,4));
p5.add(jrba = new JRadioButton("A", false));
p5.add(jrbb = new JRadioButton("B", false));
p5.add(jrbc = new JRadioButton("C", false));
p5.add(jrbd = new JRadioButton("D", false));
btg.add(jrba);
btg.add(jrbb);
btg.add(jrbc);
btg.add(jrbd);
JPanel p3=new JPanel();
p3.setLayout(new FlowLayout(FlowLayout.LEFT,5,5));
p3.add(jtfquestions=new JTextField(50));
p3.add(p5);
JPanel p4=new JPanel();
   p4.setLayout(new FlowLayout(FlowLayout.CENTER,5,5));
p4.add(btnCancel=new JButton("Cancel"));
p4.add(btnPrevious=new JButton("Previous"));
p4.add(btnNext=new JButton("Next"));
p4.add(btnSelect=new JButton("Select"));
p4.add(btnStart=new JButton("START"));
getContentPane().setLayout(new BorderLayout(5,5));
getContentPane().add(p1, BorderLayout.NORTH);
getContentPane().add(p2, BorderLayout.EAST);
getContentPane().add(p3, BorderLayout.CENTER);
getContentPane().add(p4, BorderLayout.SOUTH);
Container cn = this.getContentPane();
btnCancel.addActionListener(this);
btnPrevious.addActionListener(this);
btnStart.addActionListener(this);
btnNext.addActionListener(this);
jrba.addActionListener(this);
jrbb.addActionListener(this);
jrbc.addActionListener(this);
jrbd.addActionListener(this);
try
readFile("questions.dat");     
catch (Exception e)
     System.out.println(e);
public void actionPerformed(ActionEvent e)
public void readFile(String fileName) throws IOException
          BufferedReader bReader;
          String question;
          questionVector = new Vector();
          File inFile = new File(fileName);
          if (!inFile.exists())
          System.out.println("File does not exist");
               //System.exit(0);
     bReader = new BufferedReader(new FileReader(inFile));
     question = bReader.readLine();
     while (question != null)
     String a1, a2, a3, a4, correct;
          int iCorrect;
          a1 = bReader.readLine();
          a2 = bReader.readLine();
          a3 = bReader.readLine();
          a4 = bReader.readLine();
     correct = bReader.readLine();
     // Convert the value from a string to an integer
     iCorrect=Integer.parseInt(correct);
                     // Create a new Question object using the parameterised constructor
Question q = new Question(question,a1,a2,a3,a4,iCorrect);
     questionVector.add(q);
     question = bReader.readLine();
// Close the file stream once we have finished reading the file
     bReader.close();     
public void setQuestion(int questNum)
Question q = (Question) questionVector.get(questNum);
System.out.println("Question number "+questNum+ " is "+q.getQuestion());     
public void showQuestions()
for (int i=0; i< questionVector.size(); i++)
     // Cast the object stored in the Vector to type Question
Question q = (Question)questionVector.elementAt(i);
               q.printAll();
Now Question Frame:
// File:          Question.java
// Purpose:          A Java class to store a question and possible answers
public class Question
     private String question;
     private String answer1, answer2, answer3, answer4;
     private int correctAnswer=0;
public Question()     
public Question(String quest, String ans1, String ans2, String ans3, String ans4, int correct)
     question = quest;
     answer1=ans1;
     answer2=ans2;
     answer3=ans3;
     answer4=ans4;
     correctAnswer=correct;          
public void printAll()
System.out.println(question);
System.out.println("A: " + answer1);
System.out.println("B: " + answer2);
System.out.println("C: " + answer3);
System.out.println("D: " + answer4);
System.out.println("Correct answer is answer number "+ correctAnswer);
public String getQuestion()
             return question;
ok those are the codes now the hard part is making the question appear on the _private JTextField jtfquestions;_ n then having the ans place on the _private JRadioButton jrba, jrbb, jrbc, jrbd;_ then if a correct ans is inputed the JList score should move up like the game itself
this is what it looks like GUI wise
http://img164.imageshack.us/img164/6126/gui6iz.jpg
now anyone have any tips or help options?
thnks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • Looking for software that allows you to make "who wants to be a millionaire".  Must be able to put in your own questions and HAS to be for the Mac.  Help!

    I am a teacher who would love to create the game "who wants to be a millionaire" with my own questions.  I would use this for test reviews.  I can't not find something for the mac.  It is out there for the PC, but my class room is mac based.  I can't use anything that will allow me to run the mac in windows, either.  Anyone know of a software that will allow me to input my own questions?  Thank you very much for your time and consideration.

    You may possibly find something here:
    http://www.oneonlinegames.com/who-wants-to-be-a-millionaire-games
    but in any case beware of copyright.

  • Who wants to be a millionaire - uploading onto website

    Hi everyone,
    I'm very new to Adobe Captivate. I've created a Who wants to be a Millionaire game on Captivate 8 and would like to know exactly how I would upload it onto my webpage. I've configured it and created an HTML5 folder but am stuck on what next to do. Any help would be really appreciated.
    Many thanks in advance
    Dan

    For this interactive interaction the value of the score will be stored in the associated variable (do not forget to create it, will label it v_mil).
    Failure means that you don't get the total score, right? And since you only want to retake at the end, I suppose that is on another slide? Then it is easy, you just have to make a 'button' visible on that slide if the score is lower than the total score. That can be done On Enter for that slide:
    IF v_mil is less than v_total    you can put the exact total score here, or store that score in another user variable v_total
       Show Bt_Retake                 where that is the button that is initially invisible
    ELSE
       Continue
    The button has to trigger a simple action 'Jump to ...' to get back to the slide with the game, it will be automatically reset.

  • Looking 4 who wants to be a millionaire THEME

    Hi fellows;
    I'm producing an amateur video-show similar to the show "Who wants to be a millionaire" through Imovie 11 ... but I don't really know how can I manage to reproduce the show theme into my production (you know, question, 4 possible answers, safelines and so on ...) to make it look alike the real show ...
    can anyone give me a hint, please?

    etimax wrote:
    .... don't really know how can I manage to reproduce the show theme into my production (you know, question, 4 possible answers, safelines and so on ...) to make it look alike the real show ...
    you need an additional 'paint-app, as Pixelmator, Photoshop/elements, Gimp, ... or, if at hand, Keynote.
    create your 'lower thirds', save in the png format
    use the well-known 'transparent png'-trick http://sites.google.com/site/karstenschluter/imovie09tricks
    not exactly what you're asking for, but a bundle of suggestions on my other site
    http://sites.google.com/site/karstenschluter/how-to-make-a-vidcast
    and Welcome etimax to the  boards ....

  • Designer who want to become a AS3 coder

    I'm an established graphic designer. I don't have any prior
    knowledge of any programming what so ever. I know my way around the
    basic flash animation functions but now I want to take the step to
    become a master in Flash and Actionscript. I want to know where to
    start, I've heard that it's better to know your way around as2
    before you can start with as3, is this true? Or is it possible to
    start right away with as3? I also heard that books like "essential
    Actionsript 3" is hard to understand if you don't have basic
    programming skills with variables and such. Are there any
    book/books that cover it all? Which is the best way to learn
    ActionScript without any former programming experiences??? I'm
    sorry if this question has already been posted, but I'm very eager
    to begin exploring this new world so any tips and tricks are highly
    welcomed!

    There is absolutely no need to know that AS2 even exists in
    order to learn AS3. Learning AS2 will probably only confuse the
    issue.
    There are a number of books that can ease you in to
    actionscript. I recommend "Foundation Flash CS3 for Designers",
    ISBN: 159059861X, "How to Cheat in Flash CS3: The art of design and
    animation in Adobe Flash CS3", ISBN: 0240520580, and, "ActionScript
    3.0 Game Programming University", ISBN: 0789737027. Each of these
    books will give you a good primer into using Actionscript by using
    examples that you can follow.
    "ActionScript 3.0 Cookbook: Solutions for Flash Platform and
    Flex Application Developers", ISBN: 0596526954, is more advanced.
    It shows methods for using actionscript based on tasks that you
    want to accomplish.

  • For some reason, firefox has changed something in my laptop so that when I play games on facebook, such as deal or no deal, who wants to be a millionaire, ect. the games load only to half size, so half of my games are cut off.

    everything i have done has not fixed this problem, its only on my laptop on my parents laptops it works. V

    Oh no... NOT THE 99-PAGER!!! Anything but THAT!!!

  • Who wants to be a zillionaire

    i need urgent help, i am programming a game" who wants to be a zillionaire" and i dont know how to start, i have thot about my classes but am stuck.
    help please
    thanks

    The problem is to define classes suitable for playing a game of ?Who Wants to be a Zillionaire?. This game is a cross between the successful TV quiz shows ?Who Wants to be a Millionaire? and ?Mastermind?. Players choose a category on which to answer questions. Questions are of a multiple-choice nature with the answer being one of four possibilities. If the player answers the question correctly an amount of ?money? is credited to that player. Questions have a difficulty level according to the amount of ?money? players are awarded for answering that question correctly. The questions are asked in ascending order of difficulty and, therefore, value. Players take turns to answer questions. If a player cannot answer a question, help is available as follows:
    ?     Ask the Public. This involves a simulation of each possible answer being given a rating according to the likelihood that it is the correct answer. Ratings for all four possible answers must add up to 100% in total.
    ?     Half-and-half. Two of the possible answers are removed leaving only the right answer and one wrong answer.
    Players are only allowed to use each help facility once per game. If a wrong answer is given that player is out of the game. The winner is the player with the most money credited at the end of the game.
    Message was edited by:
    yvonne_fash

  • Who wants to be a billionaire ?

    Im busy desinging a game...Who Wants To Be A Billionaire...but
    could someone explain why the following won't draw the Round Rectangles that i ask to be drawn...
    // Main Application Class
    import java.awt.*;
    import BuildCanvas.*;
    public class User
    public static void main (String [] args)
    MakeWindow userInterface = new MakeWindow ();
    userInterface.setSize (800, 600);
    userInterface.setLocation (100, 100);
    // The MakeWindow Class
    import java.awt.*;
    import java.lang.*;
    class MakeWindow extends Frame
    Button finalButton, fiftyButton, phoneButton, askButton, retireButton;
    MenuItem quitItem, newGameItem, helpItem, aboutItem, greenItem, blueItem;
    public MakeWindow ()
    super ("Who Wants To Be A Billionaire");
    // Create the menu items.
    newGameItem = new MenuItem ("New Game");
    quitItem = new MenuItem ("Quit Billionaire");
    helpItem = new MenuItem ("Help");
    aboutItem = new MenuItem ("About");
    // Create the menus.
    Menu mainMenu = new Menu ("File");
    Menu helpMenu = new Menu ("Help");
    // Place the menu items in the menus.
    mainMenu.add (newGameItem);
    mainMenu.add (quitItem);
    helpMenu.add (helpItem);
    helpMenu.add (aboutItem);
    // Place the menus into the menu bar.
    MenuBar myMenus = new MenuBar ();
    myMenus.add (mainMenu);
    myMenus.add (helpMenu);
    setMenuBar (myMenus);
    setBackground (Color.blue);
    pack ();
    show ();
    // Call button method.
    makeButton (finalButton, 180, 550, "Final Answer");
    makeButton (fiftyButton, 270, 550, "50 / 50");
    makeButton (phoneButton, 360, 550, "Phone Friend");
    makeButton (askButton, 450, 550, "Audience");
    makeButton (retireButton, 540, 550, "Retire");
    remainingButtons ();
    } // MakeWindow constructor.
    private void remainingButtons ()
    // Creates windows for Money Ladder and Answer Boxes.
    Graphics g = getGraphics ();
    g.setColor (Color.black);
    g.fillRoundRect (200, 200, 300, 300, 7, 7);                    //**** This Code doesnt work
    g.fillRoundRect (100, 300, 50, 100, 7, 7);                    //**** This Code doesnt work
    g.fillRoundRect (100, 200, 50, 200, 7, 7);                    //**** This Code doesnt work
    // Creates, positions + sets size of buttons.
    private void makeButton (Button currentButton, int posx, int posy, String buttonText)
    currentButton = new Button (buttonText);
    add (currentButton);
    currentButton.setSize (80, 20);
    currentButton.setLocation (posx, posy);
    } // makeButton method.
    have i forgotten to call something ?
    please help me asap.
    thanks
    andrew.

    I took the liberty to make some change, (the black rectangles overlaps)
    import java.awt.*;
    import java.awt.event.*;
    class MakeWindow extends Frame
         Button   finalButton, fiftyButton, phoneButton, askButton, retireButton;
         MenuItem quitItem, newGameItem, helpItem, aboutItem, greenItem, blueItem;
    public MakeWindow ()
         super ("Who Wants To Be A Billionaire");
         setLayout(null);
         addWindowListener(new WindowAdapter()
        {     public void windowClosing(WindowEvent ev)
              {     dispose();
                   System.exit(0);
    // Create the menu items.
         newGameItem = new MenuItem ("New Game");
         quitItem    = new MenuItem ("Quit Billionaire");
         helpItem    = new MenuItem ("Help");
         aboutItem   = new MenuItem ("About");
    // Create the menus.
         Menu mainMenu = new Menu ("File");
         Menu helpMenu = new Menu ("Help");
    // Place the menu items in the menus.
         mainMenu.add (newGameItem);
         mainMenu.add (quitItem);
         helpMenu.add (helpItem);
         helpMenu.add (aboutItem);
    // Place the menus into the menu bar.
         MenuBar myMenus = new MenuBar ();
         myMenus.add (mainMenu);
         myMenus.add (helpMenu);
         setMenuBar (myMenus);
         setBackground (Color.blue);
    // Call button method.
         makeButton(finalButton,180,550,"Final Answer");
         makeButton(fiftyButton,270,550,"50 / 50");
         makeButton(phoneButton,360,550,"Phone Friend");
         makeButton(askButton,450, 550,"Audience");
         makeButton(retireButton,540,550,"Retire");
         setVisible(true);
    // Creates, positions + sets size of buttons.
    private void makeButton(Button currentButton, int posx, int posy, String buttonText)
         currentButton = new Button(buttonText);
         add(currentButton);
         currentButton.setSize (80, 20);
         currentButton.setLocation(posx, posy);
    public void paint(Graphics g)
         g.setColor (Color.black);
         g.fillRoundRect (200, 200, 300, 300, 7, 7); //**** This Code doesnt work
         g.fillRoundRect (100, 300, 50, 100, 7, 7); //**** This Code doesnt work
         g.fillRoundRect (100, 200, 50, 200, 7, 7); //**** This Code doesnt work
    public static void main (String [] args)
         MakeWindow userInterface = new MakeWindow ();
         userInterface.setSize (700, 600);
         userInterface.setLocation (10, 10);
    }

  • HT5961 I want to receive the verification code for the keychain but I was sent to unknown number because the last two digits do not represent my phone number

    I want to receive the verification code for the keychain but I was sent to unknown number because the last two digits do not represent my phone number, so how can I change it to receive it on my cell phone ?

    I found this in the iCloud Keychain FAQs:
    How do I set up iCloud Keychain on a new device if I don't have one of my other devices to approve from?
    If you don't have access to any of your other devices that are using iCloud Keychain, you can still set up iCloud Keychain on another device if you have these items:
    - Your iCloud Security Code
    - The device that is using the SMS-capable phone number you provided when you first set up iCloud Keychain. A verification code is sent via SMS to this phone number. If you don't have access to this number, contact Apple Support, who can verify your identity so that you can complete setup on your new device.
    - If you have these items, follow the iCloud Keychain setup steps documented above. Your iCloud Keychain will then be pushed from the cloud to the new device.
    So it seems that you would have to directly contact the Apple Support: http://www.apple.com/support/icloud/contact/

  • Am i the only one who when trying to enter the code for creative cloud activation ?

    I give up,i have been trying to activate a 3 month subscription for CS6 from Staples and every time i try the code it will not work.  I have used the chat live and spent about 3 hours already going nowhere.  I do not like talking on the phone to some help desk overseas and the only thing i think left to do is to return the junk.

    I tried all that and even took a picture of the numbers and blew them up so a blind person could read them and had 3 others read them off.  A simple way to fix the problem is get someone on Adobes staff to find a font that most people can read from whatever product the stick it to.
    John McDonough
    Date: Wed, 1 Aug 2012 18:33:58 -0600
    From: [email protected]
    To: [email protected]
    Subject: Am i the only one who when trying to enter the code for creative cloud activation ?
        Re: Am i the only one who when trying to enter the code for creative cloud activation ?
        created by David__B in Adobe Creative Cloud - View the full discussion
    Hey John,
    Not sure if it helps or not, but I know sometimes with codes like that its really hard to tell certain characters apart, O - like in Oscar versus 0 - number and number 1 versus lowercase L like in Lima.
    Might test entering it both ways if you have any suspect characters?
    -Dave
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4592955#4592955
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4592955#4592955. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Adobe Creative Cloud by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • This is for people who wants to mirror all they apple devices when they travel.

    this is for people who wants to mirror all they apple devices when they travel and don't want to unplug everything from the apple tv and take it with them, you can get the amazon fire tv stick and download an app called airplay upnp or the reflector app and mirror all of your apple devices to it, it is great for traveling easy to setup and move around, for example if your traveling and want to use it in the conference room and then want to take with you back to the hotel for the night and plug it in and keep on doing that routine.
    it will be great to use hopeful until apple comes out apple with their own apple tv stick 

    The Verizon DVR is admittedly not the sharpest box on the market. I admit to giving up on the multi-room DVR product, it just never worked satisfactorily for me.
    Hopefully features/functions issues  will improve in the near term with the Cisco/Scientific Atlanta box that obviously isn't going to make Q1. I admit I have ceased  holding my breath. Something does have to happen fairly soon because 160gb drives are literally going out of production.
    You do however make two statements that incorrect. Current TiVO's only need 1 cable card, since the standard cable card today in Verizon's stock  is the M-Card. You also have the option with TiVO of paying either an annual fee, or a one time fee, both of which are lower in the long term than the month to month fee. Alternatively you can by the Moxi DVR, and it includes lifetime service in the purchase price.
    While in theory a truck roll costs $79, in practice if it is for a Cable Card install, it is free (I think  FCC regulations preclude the charge).
    Apparently there is nothing in Verizon's order processing system that tells reps that there is no charge for Cable Card installations, so they often quote the $79 fee because that is the standard charge for technician to come out. As far as I can tell (and there have been lots of posts about cable card installs), no one has in fact been charged the $79 fee..

  • I'm trying to setup the new software of iCloud key chain they want to send me a code because the number they have I don't wAnt the code to go there how do I get pass this or change that number

    I'm trying to set up the iCloud keychains and it's asking me to put code in that they can send me on a phone number that is not mine how do I get pass that?

    Okay, so I'm not crazy! The number that iCloud wants to send my confirmation code to Ann's in two digits that are not my telephone number! Nor are they the telephone number of my partner! Nor are they the number of my home phone! No more other than number of my work phone! There is no way this is my telephone number they want to send the confirmation number two! And there's no way it's a number that I would've ever given them because it doesn't ended anything that is a telephone number that I own. MESSED UP.

  • Should a customer who is Blokced under a company code,

    Should a customer who is Blokced under a company code,  be visible under taxation? Is falgged for deletion taken care automatically in SAP?

    Hi,
    It is not. You may not have two persons with same Personnel number, no matter if they are in differents Company Codes. There is just one Personnel number and it must be assigned to only one employee.
    Regards,
    Edoardo

  • I am a sole proprietor business owner (work from home graphic designer) and I have a customer who wants to pay me via Apple pay. Can I accept her transaction? How do I get that rolling?

    I am a sole proprietor business owner (work from home graphic designer) and I have a customer who wants to pay me via Apple pay. Can I accept her transaction? How do I get that rolling?

    Apple Pay: Merchants FAQ - Apple Support

  • I want to get the source code of the examples of berkeley DB with Java

    Hi
    I want to get the source code of the examples of berkeley DB with Java
    Thanks and Regards
    Rahul

    Look in the "examples" directory, in the BDB JE package that you downloaded.
    --mark                                                                                                                                                                           

Maybe you are looking for

  • Oracle 8i

    I will be grateful if anyone tells me the differences between oracle 8 and oracle 8i. What Optimizer and Query improvements are new in Oracle 8i???

  • Conditional outputs needed in interactive reports

    APEX version = 4 - DB version and edition = 10g - Web server architecture = OHS - Browser(s) used = I.E. 8 - Theme = #5 opal - Templates - Region/Process type Hello I have a system where records have statuses and depending on who is logged in when th

  • Canoe Event Handling in Labview

    Anybody worked on handling the events of CANoe in Labview? I am trying to handle the event when there is a value change in the environment variable of CANoe. CANoe provides a COM method "OnChange" but i do not know how to implement this method in Lab

  • Why to use SQL Server's native backup facilities, not other backup solution?

    I've been asked in my company: why to use SQL Server's native backup facilities? Instead, they currently rely on other backup software, like Backup Exec, BrightStor, or even Microsoft System Center Data Protection Manager. Those solutions let the com

  • A movie isn't listed under my purchases. How can I find it to install on iPad?

    A movie isn't listed under my purchases or in my library, but it is on my laptop. How can I find it to install on my iPad?