我有一个JInternalFrame窗口,想让用户做一些操作之后再关闭,没操作不能关闭,如何设置不让它关闭,我写了下面代码,可执行,但还是关了.
this.addInternalFrameListener(new InternalFrameAdapter(){
        public void internalFrameClosing(InternalFrameEvent e){
          CommMethod.MessageBoxInfo("不允许关闭");   
          setVisible(true);
          return;
        }
      });