code: public static String showInputDialog(final Component parentComponent, final Object message) {
  
          return execute(new StringOptionPane() {
              public void show(final StringResult result) {
                  result.setResult(JOptionPane.showInputDialog(parentComponent, message));
              }
          });
  
      }
docs: Shows a question-message dialog requesting input from the user parented
  to <code>parentComponent</code>. The dialog is displayed on top of the
  <code>Component</code>'s frame, and is usually positioned below the
  <code>Component</code>.
  
  @param parentComponent
  the parent <code>Component</code> for the dialog
  @param message
  the <code>Object</code> to display
  @return user's input, or <code>null</code> meaning the user canceled the
  input