
-----------------------------------
Jodo Yodo
Thu Apr 07, 2005 6:20 pm

Swing help needed...
-----------------------------------
 JPanel northPanel = new JPanel ();
        JPanel ratingPanel = new JPanel ();

        northPanel.setLayout (new BorderLayout ());
        northPanel.add ("North", movieBox);

        ratingPanel.setLayout (new BorderLayout ());
        ratingPanel.add ("East", currentRating);

        getContentPane ().add (northPanel);
        getContentPane ().add (ratingPanel);

        pack ();
        setVisible (true);

For some reason, it will display the panel 'ratingPanel', but never the panel 'northPanel'.  When I use delete all the lines that are about 'ratingPanel', 'northPanel' shows up just fine.  Why won't they both show up?

-----------------------------------
rizzix
Thu Apr 07, 2005 8:17 pm


-----------------------------------
never use "strings" literals for that kind of stuff. always use the Class provided constants.

In this case for "North" it would be BorderLayout.NORTH
