• Post Reply Bookmark Topic Watch Topic
  • New Topic

AutoScroll Bar in JText Area

 
Santosh Maskar
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
How i can add the Scrool Bar for JtextArea, i want to add a auto scroll bar when the nuber for lines are not filt to the Jtextarea,

i have tried the
txtarea.setText(txtarea.getText()+new String(ch,start,length));

but not getting the correct result.


With Tnaks and regards
 
Sebastiaan Kortleven
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
just add the textarea to a jscrollpane, and add that pane to your panel..

should work
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!