View Single Post
Old May 1st, 2008, 5:41 PM   #5
kewlgeye
Programmer
 
Join Date: Jan 2008
Posts: 53
Rep Power: 1 kewlgeye is on a distinguished road
Re: Java Error Messages

Quote:
Originally Posted by Ezzaral View Post
This section is going to throw your exception if resultc is not equal to 10. I doubt that is the intent
			if (resultc == 10){
			outputCTF.setText("Your staffing is sufficient");
			}

			else
			{
			throw new TheException(); //calls
            		}

This isn't my intent. What I am trying to do is perform the calculations based on my if statements, and if anything else is entered like a ., a letter, or anything besides a number, it should be caught and display the sentence in the outputbox "Illegal entry, please enter a number"

Any ideas?
kewlgeye is offline   Reply With Quote