代码如附件,无法监听menu中菜单的动作.
应如何修改?
谢谢各位大侠.源码这里放不下,我放到网站上了.
http://www.dixnuits.com/pb.txt
谢谢大家

解决方案 »

  1.   

    lz是要给菜单里的一个选项加监听嘛?应该是给JMenuItem加
    JMenuItem1.addActionListener();
    JMenuItem2.addActionListener();
      

  2.   

    加了
    但是运行时候提示Exception in thread "AWT-EventQueue-0" java.lang.Error: Unresolved compilation problems: 
    clear cannot be resolved
    drCircle cannot be resolved
    drRect cannot be resolved
    openPic cannot be resolved
    savePic cannot be resolved而 clear,drCircle,drRect等为我的MenuItem名称