Allora ho creato la classe esterna
codice:
public class internalFrame
{
	internalFrame ()
	 {
	  JDesktopPane jDesktopPane = new JDesktopPane();
	  JInternalFrame jInternalFrame = new JInternalFrame("Nuovo ",true,true,true,true);
	jInternalFrame.setSize(200,200);
	jInternalFrame.setVisible(true);
	jDesktopPane.add(jInternalFrame);
         }	
				
}
Il problema è che JDesktopPane appartiene all'altra classe quindi se non lo definisco in questa mi da errore, ma cosi non mi funziona