View Single Post
Old Apr 30th, 2008, 4:16 PM   #2
Ezzaral
Newbie
 
Join Date: Apr 2008
Posts: 7
Rep Power: 0 Ezzaral is on a distinguished road
Re: Java Error Messages

ExitButtonHandler and main() are defined outside of your class body. Check your braces. You also have a missing brace on this if() block and no block at all on the (resultb < 8) statement
	if (resultb > 8)
	{resultb = resultb - 8;
. Attention to indentation and blocking standards will go a long way towards preventing these kinds of errors
	if (resultb > 8){
             resultb = resultb - 8;
             outputBTF.setText("You are overstaffed by " + resultb);
        }
	if (resultb < 8){
             resultb = 8 - resultb;
             outputBTF.setText("You are understaffed by " + resultb);
        }
	if (resultb == 8) {
            outputBTF.setText("Your staffing is sufficient");
        }
Ezzaral is offline   Reply With Quote