sample# is the last line in text area , so what ever i type after the last token i need to get that text.
Read the JTextArea
API:
getLineCount()
so you know the number of linesgetLineStartOffset()
andgetLineEndOffset()
to know the offsets of the text you need to get from text area. Add 7 to the start since you don't want to get the "sampler#" text.getText()
to get the text using the offsets from above.