Results 1 to 3 of 3
  1. #1
    Anoyz is offline Member
    Join Date
    Nov 2011
    Posts
    2
    Rep Power
    0

    Question Layout manager for a very simple problem!

    So, the problem is very simple:

    I want to layout (many) components in a panel, horizontally. I want them to be placed until there is horizontal space, and when they reach the end of the panel, continue on the next line (so, basically, wrapping the components just like with FlowLayout). Also, I want the panel to be vertically scrollable, that is, when components go beyond the height of the panel, add a vertical scrollbar.

    This should be easily done putting a panel with FlowLayout inside a ScrollPane, but that doesn't work.
    I found a variation of the FlowLayout (ModifiedFlowLayout) online, and it does work. However, it has some bugs. For instance, when using many components (as is the case), it has a very unusual behavior, and is very slow.

    Anyone suggest a layout manager, or any other solution?

  2. #2
    camickr is offline Senior Member
    Join Date
    Jul 2009
    Posts
    1,236
    Rep Power
    7

    Default Re: Layout manager for a very simple problem!


  3. #3
    Anoyz is offline Member
    Join Date
    Nov 2011
    Posts
    2
    Rep Power
    0

    Default Re: Layout manager for a very simple problem!

    Quote Originally Posted by camickr View Post
    Thank you for your reply.

    The WrapLayout is the same as the ModifiedFlowLayout, and therefore has the same issues: with a large number of components, it has a very strange behavior, and is very slow.

Similar Threads

  1. Problem with layout manager
    By mDennis10 in forum New To Java
    Replies: 8
    Last Post: 09-05-2011, 03:02 AM
  2. Simple GUI layout manager
    By globo in forum New To Java
    Replies: 3
    Last Post: 11-16-2010, 01:17 AM
  3. Layout Manager
    By globo in forum New To Java
    Replies: 8
    Last Post: 11-01-2010, 12:19 AM
  4. Layout manager
    By Nicholas Jordan in forum Java Applets
    Replies: 2
    Last Post: 11-24-2008, 03:02 PM
  5. MiG Layout Manager 2.4
    By levent in forum Java Software
    Replies: 0
    Last Post: 05-16-2007, 05:11 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •