I am having the following problem, I am trying to replace one word with another. It works however sometimes it overlaps the word before it.
Here is the code that I used can someone tell me what is wrong?
String original = new String(text.getText());
String with = new String(textTest.getText());
String myString = new String (textArea.getText());
int start = 0;
int end = 0;
start = myString.indexOf(original);
end = original.length() + start;
textArea.replaceRange(with,start,end);
Thank you!
Here is the code that I used can someone tell me what is wrong?
String original = new String(text.getText());
String with = new String(textTest.getText());
String myString = new String (textArea.getText());
int start = 0;
int end = 0;
start = myString.indexOf(original);
end = original.length() + start;
textArea.replaceRange(with,start,end);
Thank you!