Index: javax/swing/JRootPane.java =================================================================== RCS file: /cvs/gcc/gcc/libjava/javax/swing/JRootPane.java,v retrieving revision 1.4.2.14 diff -u -r1.4.2.14 JRootPane.java --- javax/swing/JRootPane.java 22 Oct 2004 18:12:55 -0000 1.4.2.14 +++ javax/swing/JRootPane.java 24 Dec 2004 11:48:48 -0000 @@ -333,6 +333,11 @@ protected Container contentPane; protected JButton defaultButton; + + /** + * @since 1.4 + */ + private int windowDecorationStyle = NONE; /** * DOCUMENT ME! @@ -345,6 +350,11 @@ getLayeredPane().add(menuBar, JLayeredPane.FRAME_CONTENT_LAYER); } + public void setMenuBar(JMenuBar m) + { + setJMenuBar(m); + } + /** * DOCUMENT ME! * @@ -355,6 +365,11 @@ return menuBar; } + public JMenuBar getMenuBar() + { + return getJMenuBar(); + } + /** * DOCUMENT ME! * @@ -569,4 +584,32 @@ defaultButton = newButton; firePropertyChange("defaultButton", oldButton, newButton); } + + /** + * @since 1.4 + */ + public int getWindowDecorationStyle() + { + return windowDecorationStyle; + } + + /** + * @since 1.4 + */ + public void setWindowDecorationStyle(int style) + { + if (style != NONE + && style != FRAME + && style != INFORMATION_DIALOG + && style != ERROR_DIALOG + && style != COLOR_CHOOSER_DIALOG + && style != FILE_CHOOSER_DIALOG + && style != QUESTION_DIALOG + && style != WARNING_DIALOG) + throw new IllegalArgumentException("invalid style"); + + int oldStyle = windowDecorationStyle; + windowDecorationStyle = style; + firePropertyChange("windowDecorationStyle", oldStyle, style); + } }