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 3 of 3

Thread: Scrolling in panel won't work

  1. #1
    Junior Member
    Join Date
    Apr 2014
    Posts
    13
    Thanks
    3
    Thanked 2 Times in 1 Post

    Default Scrolling in panel won't work

    I've got a pretty specific question here, and I'm hoping that I'm just missing something obvious. I've got a panel which an arbitrary number of text fields may be added to at run time (there's no way that I can know beforehand how many the user will see). I've got it set up so that the window's height, and the height of the panel in which the fields appear will never exceed the height of the screen. What I don't have is a way to make the panel scroll to access the fields that are being visually truncated. As seen below, I'm setting the autoscrolls on the panel to true, but when I run the program, the fields are simply truncated.

    pnlDeclensions.setAutoscrolls(true);

    Any suggestions or help would be appreciated. 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

  3. The Following User Says Thank You to copeg For This Useful Post:

    Sedu (October 10th, 2014)

  4. #3
    Junior Member
    Join Date
    Apr 2014
    Posts
    13
    Thanks
    3
    Thanked 2 Times in 1 Post

    Default Re: Scrolling in panel won't work

    Thanks for the link, that led me to exactly the stuff I needed!

Similar Threads

  1. Average Won't Work
    By gotdatdough in forum What's Wrong With My Code?
    Replies: 5
    Last Post: October 22nd, 2013, 11:11 AM
  2. GUI won't run properly once panel is added
    By mwardjava92 in forum AWT / Java Swing
    Replies: 4
    Last Post: February 23rd, 2013, 01:41 PM
  3. MergeSort won't work
    By joshft91 in forum What's Wrong With My Code?
    Replies: 7
    Last Post: February 7th, 2011, 09:44 PM
  4. My lines won't work!!!
    By The Mewzytion in forum What's Wrong With My Code?
    Replies: 5
    Last Post: July 2nd, 2010, 10:24 AM
  5. Why won't this while loop work?
    By trueblue in forum Loops & Control Statements
    Replies: 2
    Last Post: July 17th, 2009, 09:10 AM