I'm trying to put a CUT command in operation and I'm having problems. The
CUT works and the PASTE works too but it takes the words in the first line
of my file, if the word in the second line is identical. For example if I
use these 3 lines:
The brown cow was very sad
The brown cow was very sad
The brown cow was very sad
and let's say that I want to CUT the "was very" in the middle line then the
CUT takes the first instance on line 1 away.
Here's the code that I am using:
storeText = text.getSelectedText();
int cutindex = text.getText().indexOf(storeText);
text.replaceRange("", cutindex, cutindex + storeText.length());
Any ideas?