code: public static boolean isModal(Component component) {
  	synchronized (modals) {
  	  Iterator<Entry<RootPaneContainer, Modal>> it =
  		  modals.entrySet().iterator();
  	  while (it.hasNext()) {
  		Entry<RootPaneContainer, Modal> entry = it.next();
  		if (entry.getValue().components.contains(component)) {
  		  return true;
  		}
  	  }
  	  return false;
  	}
    }
docs: Indicates whether the component is a modal component.
  
  @param component
  the component
  @return boolean