code: public static Object showInputDialog(final Component parentComponent,
              final Object message, final String title, final int messageType, final Icon icon,
              final Object[] selectionValues, final Object initialSelectionValue) {
  
          return execute(new ObjectOptionPane() {
              public void show(final ObjectResult result) {
                  result.setResult(JOptionPane.showInputDialog(parentComponent, message, title,
                          messageType, icon, selectionValues, initialSelectionValue));
              }
          });
  
      }
docs: Prompts the user for input in a blocking dialog where the initial
  selection, possible selections, and all other options can be specified.
  The user will able to choose from <code>selectionValues</code>, where
  <code>null</code> implies the user can input whatever they wish, usually
  by means of a <code>JTextField</code>. <code>initialSelectionValue</code>
  is the initial value to prompt the user with. It is up to the UI to
  decide how best to represent the <code>selectionValues</code>, but
  usually a <code>JComboBox</code>, <code>JList</code>, or
  <code>JTextField</code> will be used.
  
  @param parentComponent
  the parent <code>Component</code> for the dialog
  @param message
  the <code>Object</code> to display
  @param title
  the <code>String</code> to display in the dialog title bar
  @param messageType
  the type of message to be displayed:
  <code>ERROR_MESSAGE</code>, <code>INFORMATION_MESSAGE</code>,
  <code>WARNING_MESSAGE</code>, <code>QUESTION_MESSAGE</code>,
  or <code>PLAIN_MESSAGE</code>
  @param icon
  the <code>Icon</code> image to display
  @param selectionValues
  an array of <code>Object</code>s that gives the possible
  selections
  @param initialSelectionValue
  the value used to initialize the input field
  @return user's input, or <code>null</code> meaning the user canceled the
  input