Your problem may be that you're mixing a GUI interface with a text interface. Have you tried using a JOptionPane to display the error message?Snipe Anthony wrote:the problem is it still doesn't output.
It accepted it but didn't change the output when I put a 0 or negative number into the Length or Width field.
Learning language is easy but learning basics is difficult
Yes, is meSnipe Anthony wrote:I changed that as well and it still won't output. Is this the john joe from javaprogrammingforums? If so it's Snipe from yesterday hah.
Learning language is easy but learning basics is difficult
Snipe Anthony wrote:The "invalid input, number has to be positive" output. It still won't register and execute.
Learning language is easy but learning basics is difficult
John Joe wrote:
Snipe Anthony wrote:The "invalid input, number has to be positive" output. It still won't register and execute.
In this line
The output will shows in system only. If you want to display it as dialog, use JOptionPane instead
Learning language is easy but learning basics is difficult
Just add a string as dialog titleSnipe Anthony wrote:Okay so I am a little confused, where would I put that?
Learning language is easy but learning basics is difficult
No problem Snipe, I deleted two of them.
Output not showing up on both ?Snipe Anthony wrote:Whoa. sorry computer is spazzing out. Didn't mean to post that 3 times, sorry!
Learning language is easy but learning basics is difficult
Learning language is easy but learning basics is difficult
But the OP was already using <=John Joe wrote:. . . you also need to change the operator from < to <= to detect value 0
The OP had remove that <= operator when he used try and catch in the latest codeCampbell Ritchie wrote:But the OP was already using <=
Learning language is easy but learning basics is difficult
I got this tall by not having enough crisco in my diet as a kid. This ad looks like it had plenty of shortening:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
|