• Post Reply Bookmark Topic Watch Topic
  • New Topic

focus on new added line of JTextArea.. please Help

 
Qasim Shabbir
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
i want to focus on new line appended in text area how can i do it..
please help me in this regards..
thanking you
Qasim Shabbir
 
Bhagya Tangutur
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you try by calling setSelectionStarts(int position) and setSelectionEnd(int position) methods on JTextArea component after adding your text?
 
Qasim Shabbir
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanx for reply.
i add a JScrollPane on JTextArea now i want tht JScrollPane make auto scroll and show me the last appended text.
i hope u understand..
thnx again
Qasim Shabbir
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!