i have text which is very long so i need to split it into number of lines. so is there any algorithm to do so.
jtextarea is not what i need.so please suggest me other than jtextarea.
The simplest approach would just be to insert a newline every N characters. That's probably not what you want though. I could make some other guesses, but a better approach would be for you to clearly and precisely describe your requirements.
Don't get me started about those stupid light bulbs.