Hi Lillian, On Sun, 2006-02-12 at 21:00 -0500, Lillian Angel wrote: > This is so awesome! I was working on fixing this same bug.
Thanks! Good to know this was confusing to others too. For your information, I am still trying to figure out how the Panel realization/getGraphics() should work (any help with that appreciated since I think I just don't really get it). And I am working on fixing a crash with adding Menus to Menus as in the attached patch. Cheers, Mark
import java.awt.*; import java.awt.event.*; public class MenuMenu extends Frame implements ActionListener { Menu m; public static void main(String[] args) { new MenuMenu(); } MenuMenu() { super("MenuMenu"); MenuBar bar = new MenuBar(); m = new Menu("Menu"); bar.add(m); MenuItem item = new MenuItem("Item"); item.addActionListener(this); m.add(item); setMenuBar(bar); setSize(60, 60); show(); } public void actionPerformed(ActionEvent ae) { Menu m2 = new Menu("Menu2"); MenuItem item2 = new MenuItem("Item2"); m.add(item2); m.add(m2); } }
signature.asc
Description: This is a digitally signed message part