/** * Removes the menu bar. * * @param m the menu bar * @exception NullPointerException if the java frame is null * @exception NullPointerException if the menu bar is null */ public void removeMenuBar(MenuBar m) throws NullPointerException { javax.swing.JFrame f = (javax.swing.JFrame) getJavaObject(); if (f != null) { if (m != null) { f.setJMenuBar(null); } else { throw new NullPointerException("Could not set menu bar. The menu bar is null."); } } else { throw new NullPointerException("Could not set menu bar. The java frame is null."); } }