I've written an Applet that takes a string as input (from JOptionPane) and then tells the user whether it's a palindrome or not. Works great, but I have a problem.
I need the Applet to restart after giving the answer. In other words, I enter a string. Then I want the applet to say it is or isn't a palindrome and then start over. I want that to continue until I type "Q" to quit.
I first wrote this as an application and it works fine, but I need it to be an applet.
two things I've tried that didn't work were to recall the init() method after printing the "That's a palindrome." statement. That would give me the JOptionPane box again, but then stop.
The next thing I tried was to create a starter() method. I called it from init() and after the answer statements. I got the exact same result.
Any ideas?
I need the Applet to restart after giving the answer. In other words, I enter a string. Then I want the applet to say it is or isn't a palindrome and then start over. I want that to continue until I type "Q" to quit.
I first wrote this as an application and it works fine, but I need it to be an applet.
two things I've tried that didn't work were to recall the init() method after printing the "That's a palindrome." statement. That would give me the JOptionPane box again, but then stop.
The next thing I tried was to create a starter() method. I called it from init() and after the answer statements. I got the exact same result.
Any ideas?