Border layout and Jlist

From: Daniel Santos (daniel.dlds_at_gmail.com)
Date: 03/23/05

  • Next message: yorkmac: "Printing from a text pane"
    Date: Wed, 23 Mar 2005 22:53:08 +0000
    
    

    Hello,

    I have the following structure of components in a internal frame:

    JInternalFrame (BorderLayout)
            - JPanel (BorderLayout) (BorderLayout.WEST)
                    - JScrollPane (BorderLayout.CENTER)
                            - JList
            - JPanel (BorderLayout) (BorderLayout.CENTER)
                    - JButton (BorderLayout.CENTER)

    What I want to do with this is to have the first JPanel with a fixed
    width and resizable height and the second JPanel resizable in both
    dimensions.

    I set a preferred size on the JPanel containing the scroll pane and that
       works.
    My problem is that the JList appears with zero dimension. I just want
    the list to stretch to the borders of the containing JPanel.

    Anyone can help?
    Many thanks
    Daniel Santos


  • Next message: yorkmac: "Printing from a text pane"