@@ -0,0 +1,1153 @@
+%0Apackage net.restlesscoder.sandbox.ui;%0A%0Aimport java.awt.Button;%0Aimport java.awt.Frame;%0Aimport java.awt.Menu;%0Aimport java.awt.MenuBar;%0Aimport java.awt.MenuItem;%0Aimport java.awt.event.WindowAdapter;%0Aimport java.awt.event.WindowEvent;%0A%0Apublic class InheritedMenuBar %7B%0A%0A%09public static void main(final String... args) %7B%0A%09%09final Frame f = new Frame(%22Main Frame%22);%0A%09%09f.add(new Button(%22Go%22));%0A//%09%09final JFrame f = new JFrame(%22Hello%22);%0A//%09%09f.getContentPane().add(new JButton(%22Go%22));%0A%0A%09%09final MenuBar menubar = new MenuBar();%0A%09%09final Menu file = new Menu(%22File%22);%0A%09%09final MenuItem fileExit = new MenuItem(%22Exit%22);%0A%09%09file.add(fileExit);%0A%09%09menubar.add(file);%0A%09%09f.setMenuBar(menubar);%0A%0A%09%09f.setSize(400, 100);%0A%09%09f.setVisible(true);%0A%09%09f.addWindowListener(new WindowAdapter() %7B%0A%0A%09%09%09@Override%0A%09%09%09public void windowClosing(final WindowEvent e) %7B%0A%09%09%09%09f.dispose();%0A%09%09%09%7D%0A%09%09%7D);%0A%09%09%0A%09%09final Frame f2 = new Frame(%22Second Frame%22);%0A%09%09f2.add(new Button(%222nd%22));%0A%09%09f2.setSize(300, 300);%0A%09%09f2.setVisible(true);%0A%09%09f2.setResizable(false);%0A%09%09f2.addWindowListener(new WindowAdapter() %7B%0A%0A%09%09%09@Override%0A%09%09%09public void windowClosing(final WindowEvent e) %7B%0A%09%09%09%09f2.dispose();%0A%09%09%09%7D%0A%09%09%7D);%0A%09%7D%0A%0A%7D%0A

Add another menu-bar-related experiment