public static void useInternalFrames(JRootPane rootPane){
  if (rootPane != null) {
    useInternalFrames(rootPane.getLayeredPane());
  }
 else {
    useInternalFrames((JLayeredPane)null);
  }
}

public static void useInternalFrames ( JRootPane rootPane ) { if ( rootPane != null ) { useInternalFrames ( rootPane . getLayeredPane ( ) ) ; } else { useInternalFrames ( ( JLayeredPane ) null ) ; } }
a method to set the environment to be able to tell other components to internalframes .
