frame.doDefaultCloseAction();
  public void closeFrame(JInternalFrame frame)  {    Container c = frame.getParent();    frame.doDefaultCloseAction();    if (c != null)      {	if (frame.isIcon())	  c.remove(frame.getDesktopIcon());	else	  c.remove(frame);	c.repaint();      }  }