How do I make a 'find and replace' program in Java?
I have developed a special code using simple symbols that I can use to form letters which combine to form words. When I want to translate something into my code, it takes me a long time because I have to do it all by hand (not quite as slow as it used to be because now I have memorized all the symbol combinations). Because of this slow translation speed, I want to make a Java program to help me out. This is what I want it to do:
The window of the program will be laid out in BreezySwing GUI. If possible, I would like to stay away from complicated syntax in my program; that is why I use BreezySwing. The window will have two text areas, and one button. The user will type whatever they want into the upper text area and make it just like they want it. When ready, the user will click the button in between the two text areas. This will activate a method in the program that will translate the user's text into my code.
One possible method for translation is find and replace. I got this idea from the find and replace feature in Microsoft Office. It works by searching for a string in a document, and then inserting something else in its place. In my case, my program could somehow search the user's input for all the different letters, numbers, and symbols and then determine what the coded letter, number, or symbol would be. This is the part of my program that I need help with.
Here is an example:
Assume that the user's input is "Find and Replace".
Once the translation method is activated, the program will start searching the input for matching characters. It could begin with the letters, and then end with other symbols like period, comma, question mark, space, etc. When it finds matches, it will start displaying the translation in the second text area of the program's window. When done with a specific letter, number, or symbol, it will move on to the next character.
Guaranteed ten points for best solution.