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: Dynamic numbber of JPanels

  1. #1
    Member
    Join Date
    Mar 2010
    Posts
    111
    Thanks
    19
    Thanked 0 Times in 0 Posts

    Default Dynamic numbber of JPanels

    does any body have any idea about the best way that I can do the following.

    I am designing a GUI which consists of multiple(not known how many) JPanels. The layout of each JPanel is FlowLayout and is figured as a combination of a JCheckBox and a JEditorPane. These JPanels are generated one at a time. suppose that each time as an answer to an event one JPanel is created. I added all of them to a Box and then I added the Box to another JPanel and then Finally these JPanels should be displayed in a JScrollPane.

    my problem is on the last part. I can't add the Jpanel which consists of all the JPanels to JScrollaPane.
    I used paneScrollPane = new JScrollPane(spanel); but it doesn't work


  2. #2
    Member
    Join Date
    Mar 2010
    Posts
    111
    Thanks
    19
    Thanked 0 Times in 0 Posts

    Default Re: Dynamic numbber of JPanels

    sorry, just after posting the thread, I got the point.

  3. #3
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 287 Times in 225 Posts
    Blog Entries
    4

    Default Re: Dynamic numbber of JPanels

    Glad you solved this issue nasi
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

    Looking for a Java job? Visit - Java Programming Careers

  4. The Following User Says Thank You to JavaPF For This Useful Post:

    nasi (May 15th, 2010)

Similar Threads

  1. repainting a jframe containing two jpanels
    By musasabi in forum What's Wrong With My Code?
    Replies: 0
    Last Post: May 11th, 2010, 11:31 PM
  2. Replies: 0
    Last Post: April 11th, 2010, 09:56 AM
  3. dynamic method problem...
    By Ranger-Man in forum Object Oriented Programming
    Replies: 8
    Last Post: September 7th, 2009, 05:22 PM
  4. Replies: 2
    Last Post: July 8th, 2009, 07:35 AM