Hii kartik,
When you click anywhere over JTextArea, auto-scrolling have possible to be stopped. Because the position of caret once changed, view point changed too. In this time you should set caret position when you append or add some text. On my way, I made method including set caret position, and then use it when anything to be added or appended.
You can try this:
JScrollBar vbar = scrollPane.getVerticalScrollBar();
for (int i = 0; i < 20; i++) {
myJTxt.append("This is text " + i + "\n");
vbar.setValue(vbar.getMaximum());
vbar.paint(vbar.getGraphics());
myJTxt.scrollRectToVisible(myJTxt.getVisibleRect());
myJTxt.paint(myJTxt.getGraphics());
try {
Thread.sleep(250);
} catch (InterruptedException ex) {
Logger.getLogger(ScrollTextView.class.getName()).log(Level.SEVERE, null, ex);
}
}