I'm pretty new to writing programs in java and i have a school assignment. First, i need to know how to change the text in the title bar of an input dialog box, a message dialog box and a confirm dialog box. Also, the way i have it set up is that in the first input box, i need to be able to know if the user hits 'cancel' and send the program to a different part. right now, if the user hits cancel, the whole program goes away and i get error messages that say 'number format exception: null' i'm so confused someone please help!
i've attached the panel i created...maybe that will clear up what it is i'm trying to do.
When you are parsing the integer if the number is invalid it will pass back a number format exception rather than passing back null, this is why you are getting an incompatible type on that line.
this still doesn't work...
after the user hits cancel, i want the program to go on and open a new box asking if they want to play again...
your new code compiles fine, but it doesn't do what i'm working for. thanks anyways, any futher help would also be appreciated.