PLEASE HELP! Final project (specifically with buttons/labels/events)
Author |
Message |
sbenny
|
Posted: Wed Jan 18, 2012 6:03 pm Post subject: PLEASE HELP! Final project (specifically with buttons/labels/events) |
|
|
Hello. I am attempting to make a trivia game in a Java applet for a final project for school. I have worked hard at it for the past few days and I don't really feel like I am getting anywhere. I know what I want the program to be, I just don't know much of the code to make it.
My basic outline is:
- Have two buttons (one labelled easy, one labelled hard) based on difficulty, and when one is clicked, it begins a trivia game with questions of that difficulty.
- Capture two player's names and then have the players take alternate turns to score points if the questions are answered correctly, I'd like to have points subtracted from their score if an answer is incorrect
- The questions will be read in from .txt files and will be multiple choice with 3 possible answers
- After each user has answered ten questions, their final scores will be tallied and a winner (or tie) will be announced and an option to restart will be given
I have a small amount done so far, just for capturing names/turns, but I cannot for the life of me figure out how to label the buttons "EASY" and "HARD" and properly call in actions/events (I think ActionListener is used?).
I've also attached the file, in case there's something that can be simply added or removed. Our computer science class uses JCreator if that is of any significance.
Any help at all would be very, very greatly appreciated. Thank you.
Description: |
Trivia game so far (1/18/12) |
|
Download |
Filename: |
canadianhistorytrivia.java |
Filesize: |
1.85 KB |
Downloaded: |
82 Time(s) |
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
Velocity
|
Posted: Fri Feb 10, 2012 10:40 am Post subject: RE:PLEASE HELP! Final project (specifically with buttons/labels/events) |
|
|
you have to revent the processing time for your buttons so that the computer knows when the button is pressed
|
|
|
|
|
|
|
|