Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: JScrollPane

  1. #1
    Member
    Join Date
    Jul 2009
    Posts
    31
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Exclamation JScrollPane

    Well I don't exactly have the code, but it's not necessary for me to provide any at this moment.
    The problem is I have a JScrollPane, and we all known it has a scrollbar if there is too much text to fit in the box. When I have too many lines, instead of following the new text being entered it just stays still, and only old text is visible. To see the newly added lines, the user has to click on the bar and scroll down. This gets tedious, is there any way to have it always display new text instead of just making the user go down to see new text? Thanks.


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: JScrollPane

    This doesn't seem to be the behavior of a JScrollPane on my system (unix,mac). Because its not apparent exactly what you are doing, perhaps posting code that will reproduce the occurrence will help to diagnose the problem. Worse comes to worse, you can add a DocumentListener and call something like scrollRectToVisibe(Rect r) to scroll

Similar Threads

  1. JTable in JScrollPane
    By alwayslearner in forum AWT / Java Swing
    Replies: 1
    Last Post: January 31st, 2010, 10:24 PM
  2. JTable in JScrollPane
    By alwayslearner in forum File I/O & Other I/O Streams
    Replies: 0
    Last Post: January 29th, 2010, 11:42 AM
  3. About Title border in jscrollpane
    By subhvi in forum AWT / Java Swing
    Replies: 2
    Last Post: December 15th, 2009, 12:45 AM
  4. Data is getting corrupt in Jscrollpane
    By ruchika in forum AWT / Java Swing
    Replies: 0
    Last Post: September 1st, 2009, 10:41 AM
  5. Replies: 1
    Last Post: May 21st, 2009, 03:41 AM