Each of the buttons that I have listed performs some type of action. The button that says "reverse" in the text field should output the word hello backward olleh. The string at the very bottom, private String reverse(String inStr) is just not outputting correctly.
I'm really new at this and I can't figure out why it's not working. Most of it is working except for the hello reverse part. Can anyone help, please.
public static final int WIDTH = 600; public static final int HEIGHT = 300; public static final int LINES = 10; public static final int CHAR_PER_LINE = 40; privateJTextArea theText; private String memo1 = "Memo 1 Saved."; private String memo2 = "Memo 2 Saved."; private String memo3 = "No Memo 3."; private String memo4 = "No Memo 4."; private String memo5 = "No Memo 5."; private String memo6 = "No Memo 6."; private String reverse;
Hi Lisa Your code is very good.The only thing that is missing is an implementation of the reverse method. This method should take s string, reverse it, and give you back the reversed string. When you click on the button reverse, any text that is in the textArea should be reversed. Try this code
Joined: Apr 26, 2006
Thanks Michael and Samir for your help. I think I got it working now.