code: public static JDialog newJDialog(Component parentComponent, String title, boolean modal,
  		GraphicsConfiguration gc)
  	{
  		final JDialog dialog;
  
  		Window window = AwtExtensions.getWindowForComponent(parentComponent);
  		if (window instanceof Frame)
  		{
  			dialog = new JDialog((Frame)window, title, modal, gc);
  		}
  		else if (window instanceof Dialog)
  		{
  			dialog = new JDialog((Dialog)window, title, modal, gc);
  		}
  		else
  		{
  			dialog = new JDialog((Frame)null, title, modal, gc);
  		}
  		return dialog;
  	}
docs: Factory method for create a {@link JDialog} object.
  
  @param parentComponent
  the parent component
  @param title
  the title
  @param modal
  the modal
  @param gc
  the {@code GraphicsConfiguration} of the target screen device; if {@code null},
  the default system {@code GraphicsConfiguration} is assumed
  @return the new {@link JDialog}