That is great that you got it to work, Congrats! A few items to consider for future development and improvement:
1- when posting here, please
UseCodeTags (<- link). Makes the code a lot easier to read, don't you think (I added them to your post for you)
2- lines 17-20 are a bit redundant. There is no need to treat
aub == 0 as a special case, since
aub = aub + ub would provide the same results. So those 4 lines could be done in 1 line, which is simpler, and simpler is always better.
3- Consider getting the String from the JTextArea just once and storing it locally. Maybe add
Sting sourceString = jTextArea4.getText(); at the start of the code, then use
sourceString wherever you had been using
jTextArea4.getText(). This is more expressive (as long as you name the String variable something useful), means fewer method calls, lower chance of a mistype causing an error (like typing
jTextArea3.getText()). You can still mistype
sourceString but at least the compiler will find the error for you (rather than accidentally getting text from the wrong jTextArea and weird results happening). Finally, it protects you from a certain amount of danger if the value in jTextArea4 is changed while you are doing your work.
4- Your code here (which I assume is a method) does two things at the same time; it breaks the String into pieces and displays those pieces.
You should practice designing code so that methods like this does one thing only. Since you have two things, I would consider using two methods, one which breaks the String into pieces, and one which displays pieces of Strings.
5- If you decide to do #4, then you should investigate StringBuilder, like Campbell said, it would be smoother if your goal is to actually build a single String with line breaks (rather than break a String into pieces)
I hope you realize these are criticisms, they are meant as next-steps you can follow to improve both the code and you Java skills.