< prev index next >

src/java.desktop/share/classes/javax/swing/JApplet.java

Print this page




 226     }
 227 
 228     /**
 229      * Just calls <code>paint(g)</code>.  This method was overridden to
 230      * prevent an unnecessary call to clear the background.
 231      */
 232     public void update(Graphics g) {
 233         paint(g);
 234     }
 235 
 236    /**
 237     * Sets the menubar for this applet.
 238     * @param menuBar the menubar being placed in the applet
 239     *
 240     * @see #getJMenuBar
 241     *
 242     * @beaninfo
 243     *      hidden: true
 244     * description: The menubar for accessing pulldown menus from this applet.
 245     */

 246     public void setJMenuBar(JMenuBar menuBar) {
 247         getRootPane().setMenuBar(menuBar);
 248     }
 249 
 250    /**
 251     * Returns the menubar set on this applet.
 252     *
 253     * @return the menubar set on this applet
 254     * @see #setJMenuBar
 255     */

 256     public JMenuBar getJMenuBar() {
 257         return getRootPane().getMenuBar();
 258     }
 259 
 260 
 261     /**
 262      * Returns whether calls to <code>add</code> and
 263      * <code>setLayout</code> are forwarded to the <code>contentPane</code>.
 264      *
 265      * @return true if <code>add</code> and <code>setLayout</code>
 266      *         are forwarded; false otherwise
 267      *
 268      * @see #addImpl
 269      * @see #setLayout
 270      * @see #setRootPaneCheckingEnabled
 271      * @see javax.swing.RootPaneContainer
 272      */
 273     protected boolean isRootPaneCheckingEnabled() {
 274         return rootPaneCheckingEnabled;
 275     }




 226     }
 227 
 228     /**
 229      * Just calls <code>paint(g)</code>.  This method was overridden to
 230      * prevent an unnecessary call to clear the background.
 231      */
 232     public void update(Graphics g) {
 233         paint(g);
 234     }
 235 
 236    /**
 237     * Sets the menubar for this applet.
 238     * @param menuBar the menubar being placed in the applet
 239     *
 240     * @see #getJMenuBar
 241     *
 242     * @beaninfo
 243     *      hidden: true
 244     * description: The menubar for accessing pulldown menus from this applet.
 245     */
 246     @SuppressWarnings("deprecation")
 247     public void setJMenuBar(JMenuBar menuBar) {
 248         getRootPane().setMenuBar(menuBar);
 249     }
 250 
 251    /**
 252     * Returns the menubar set on this applet.
 253     *
 254     * @return the menubar set on this applet
 255     * @see #setJMenuBar
 256     */
 257     @SuppressWarnings("deprecation")
 258     public JMenuBar getJMenuBar() {
 259         return getRootPane().getMenuBar();
 260     }
 261 
 262 
 263     /**
 264      * Returns whether calls to <code>add</code> and
 265      * <code>setLayout</code> are forwarded to the <code>contentPane</code>.
 266      *
 267      * @return true if <code>add</code> and <code>setLayout</code>
 268      *         are forwarded; false otherwise
 269      *
 270      * @see #addImpl
 271      * @see #setLayout
 272      * @see #setRootPaneCheckingEnabled
 273      * @see javax.swing.RootPaneContainer
 274      */
 275     protected boolean isRootPaneCheckingEnabled() {
 276         return rootPaneCheckingEnabled;
 277     }


< prev index next >