facebook

Scrolling in JtextPane

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #252153 Reply

    sienaluke
    Member

    I created a chat program and i am using a JtextPane to display the text. i have autoscrolls on set, but i have to actually use them to see new text when the pane is updated. is there a way to keep the scroll at the bottom so i don’t need to scroll down everytime.

    or is there a better approach that the JtextPane.

    #252164 Reply

    Riyad Kalla
    Member

    Moving to OT > Soft Dev

    JTextPane is overkill if you are only displaying plain text, JTextArea will be lighter weight. Autoscroll not scrolling has been a issue marked for a while in Swing I believe, you can also adjust the setVisibleRect value on the TextArea to the highest y value to keep scrolling every time text is entered if you need to.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Scrolling in JtextPane

You must be logged in to post in the forum log in