Index: javax/swing/JPanel.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/JPanel.java,v retrieving revision 1.10 diff -u -r1.10 JPanel.java --- javax/swing/JPanel.java 2 Jul 2005 20:32:48 -0000 1.10 +++ javax/swing/JPanel.java 7 Sep 2005 15:32:27 -0000 @@ -52,63 +52,61 @@ */ public class JPanel extends JComponent implements Accessible { - public JPanel() - { - this(new FlowLayout(), - true); - } + public JPanel() + { + this(new FlowLayout(), true); + } + + public JPanel(boolean double_buffered) + { + this(new FlowLayout(), double_buffered); + } + + public JPanel(LayoutManager layout) + { + this(layout, true); + } + + public JPanel(LayoutManager layout, boolean isDoubleBuffered) + { + if (layout == null) + { + // TODO: Is this correct? Or should we throw a NPE? + layout = new FlowLayout(); + } + setLayout(layout); + setOpaque(true); + + updateUI(); + } + + public String getUIClassID() + { + return "PanelUI"; + } + + public void setUI(PanelUI ui) + { + super.setUI(ui); + } + + public PanelUI getUI() + { + return (PanelUI) ui; + } + + public void updateUI() + { + setUI((PanelUI) UIManager.getUI(this)); + } + + public AccessibleContext getAccessibleContext() + { + return null; + } - public JPanel(boolean double_buffered) - { - this(new FlowLayout(), - double_buffered); - } - - public JPanel(LayoutManager layout) - { - this(layout, - true); - } - - - public JPanel(LayoutManager layout, - boolean isDoubleBuffered) - { - if (layout == null) - { - System.err.println("NO LAYOUT SET !!!"); - layout = new FlowLayout(); - } - setLayout(layout); - setOpaque(true); - - updateUI(); - } - - public String getUIClassID() - { return "PanelUI"; } - - - public void setUI(PanelUI ui) { - super.setUI(ui); - } - - public PanelUI getUI() { - return (PanelUI)ui; - } - - public void updateUI() { - setUI((PanelUI)UIManager.getUI(this)); - } - - - public AccessibleContext getAccessibleContext() - { - return null; - } - - protected String paramString() - { + protected String paramString() + { return "JPanel"; - } + } }