Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4226644

Request a JOptionPane.showInputDialog(Object message, String default) method

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.2.1
    • client-libs
    • beta
    • generic
    • generic



      Name: vi73552 Date: 04/04/99


      It would be nice to have a convenient way to show an InputDialog with a default value already entered.

      This could be done with either of the following method signatures:
      JOptionPane.showInputDialog(Object message, Object default)
      JOptionPane.showInputDialog(Object message, String default)


      Example usage:

           String name = getLastNameUsed();
           name = JOptionPane.showInputDialog("Enter name", name);


      The default value should be selected when the dialog is shown, so that the user can type a new value to replace the default value without having to use the delete or backspace key to delete the default value first.
      (Review ID: 56484)
      ======================================================================

            shickeysunw Shannon Hickey (Inactive)
            vasya Vassili Igouchkine (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: