code: public Font showDialog(Component component, String title) {
  
          FontTracker ok = new FontTracker(this);
          JDialog dialog = createDialog(component, title, true, ok, null);
          dialog.addWindowListener(new FontChooserDialog.Closer());
          dialog.addComponentListener(new FontChooserDialog.DisposeOnClose());
  
          dialog.setVisible(true); // blocks until user brings dialog down...
  
          return ok.getFont();
      }
docs: Shows a modal font-chooser dialog and blocks until the
  dialog is hidden.  If the user presses the "OK" button, then
  this method hides/disposes the dialog and returns the selected color.
  If the user presses the "Cancel" button or closes the dialog without
  pressing "OK", then this method hides/disposes the dialog and returns
  <code>null</code>.
  
  @param component    the parent <code>Component</code> for the dialog
  @param title        the String containing the dialog's title
  @return the selected font or <code>null</code> if the user opted out
  @exception HeadlessException if GraphicsEnvironment.isHeadless()
  returns true.
  @see java.awt.GraphicsEnvironment#isHeadless