code: public static Component getRootJDialog(Component component)
  	{
  		while (null != component.getParent())
  		{
  			component = component.getParent();
  			if (component instanceof JDialog)
  			{
  				break;
  			}
  		}
  		return component;
  	}
docs: Gets the root JDialog from the given Component Object.
  
  @param component
  The Component to find the root JDialog.
  @return 's the root JDialog.