code: private static void addModal_(RootPaneContainer rootPane,
  								Component component, ModalListener listener,
  								Integer modalDepth) {
  	synchronized (modals) {
  	  if (isModal(component) == false) {
  		getModal(rootPane).addModal(component, listener, modalDepth);
  	  }
  	}
    }
docs: Add a modal component in the RootPaneContainer.
  
  @param rootPane
  the RootPaneContainer
  @param component
  the component for modal
  @param listener
  the listener for modal
  @param modalDepth
  the depth for modal