• Post Reply Bookmark Topic Watch Topic
  • New Topic

JScrollPane problem  RSS feed

 
Narendran Nair
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have got one more dought in the JScrollPane section.
i am writing a designing a java chat program, the problem is when all the messages from the users need to be displayed in one area, the scroll bar doesn't scroll the position of the new text added, it works well in the position where the message is typed. can any one suggest anything, i am using the scrollpane on JTextComponent
Narendran
 
Joe Ess
Bartender
Posts: 9439
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't cross post. Makes it hard to follow the conversation. The Swing Tutorial has a Tutorial on how to use Scroll Panes, and it mentions a void scrollRectToVisible(Rectangle) method in JComponent. Look into that. . .
 
Narendran Nair
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks man
and i am sorry for the cross post wont happen again . i am using these kind of message posting for the first time
thanks
bye till the next POST
Naren
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!