This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes scrolling downwards in a jtextarea Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "scrolling downwards in a jtextarea" Watch "scrolling downwards in a jtextarea" New topic

scrolling downwards in a jtextarea

sushant prabhu
Ranch Hand

Joined: Mar 22, 2001
Posts: 66

I am having a JTextArea the content of which gets appended when a certain method is called. The scrollbar scrolls upwards when a new line gets appended to the jtextarea.
But the scrollbar scrolls downwards when the line is appended to the JtextArea if i am appending the line via actionPerformed method.
What i want is to force a downward movement of the scrollbar as and when the text is appended to the Jtext area. how do i force this behaviour.
I am having a JScrollPane on which i am adding the Jtextarea

Sushant Prabhu<br />SCJP2<br />SCWCD<br />OCA9i
I agree. Here's the link:
subject: scrolling downwards in a jtextarea
Similar Threads
Need Volunteer to help with JTextArea,JScrollPane problem...
urgent can somebody get this scrollbar move down
A reliable way to redraw a frame?
Scrolling a JPanel
JScrollpane - Force autoscroll to bottom