AzWildcats81
01-16-2005, 03:54 PM
When i i want it to add a certain amount to the intCashEarned varable and then display it, it will just subtract tha amount instead. Im using Ready to Program. Here is some example code of what im talking about.
Object objSource = evt.getSource ();
//Catagory #1 -- $100
if (objSource == btn100Cat1)
{
sndTheme.play ();
lblQLine1.setText ("What is the capitol of Canada?");
lblAnsA.setText ("A: Ottawa");
lblAnsB.setText ("B: Toronto");
lblAnsC.setText ("C: Vancouver");
btn100Cat1.setEnabled (false);
btnOK.setEnabled (true);
if (optA.getState ())
fltCashEarned = 100;
else
fltCashEarned = -100;
}
When they select option button A it just subracts 100 dollars instead of adding it ot the total score.
To view my entire program go here...
kenigweb.com/JeopardyApplet.java
you can open it in notepad if you dont have Ready to Program.
Object objSource = evt.getSource ();
//Catagory #1 -- $100
if (objSource == btn100Cat1)
{
sndTheme.play ();
lblQLine1.setText ("What is the capitol of Canada?");
lblAnsA.setText ("A: Ottawa");
lblAnsB.setText ("B: Toronto");
lblAnsC.setText ("C: Vancouver");
btn100Cat1.setEnabled (false);
btnOK.setEnabled (true);
if (optA.getState ())
fltCashEarned = 100;
else
fltCashEarned = -100;
}
When they select option button A it just subracts 100 dollars instead of adding it ot the total score.
To view my entire program go here...
kenigweb.com/JeopardyApplet.java
you can open it in notepad if you dont have Ready to Program.