JDK-4226644 : Request a JOptionPane.showInputDialog(Object message, String default) method
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.2.1
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 1999-04-05
  • Updated: 2001-11-13
  • Resolved: 2001-11-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availabitlity Release.

To download the current JDK release, click here.
Other
1.4.0 betaFixed
Related Reports
Relates :  
Relates :  
Description

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) 
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: merlin-beta FIXED IN: merlin-beta INTEGRATED IN: merlin-beta
2004-06-14

WORK AROUND Name: vi73552 Date: 04/04/99 Use the following method: JOptionPane.showInputDialog(Component parentComponent, Object message, String title, int messageType, Icon icon, Object[] selectionValues, Object initialSelectionValue) ======================================================================
2004-06-11

EVALUATION Yes, this would be convenient (currently the long version of showInputDialog() must be used). Adding two new static methods: showInputDialog(Object message, Object initialSelectionValue) showInputDialog(Component parentcomponent, Object message, Object initialSelectionValue) amy.fowler@Eng 2000-03-16 Amy Fowler intends on adding some more code to this fix. Here's an excerpt from an email from Amy: "You can move it back to unfixed for now (I have it marked on my todo list to go back and add the internal frame versions). I just recommend we do whatever will be the least overhead for all parties involved.... Aim" nancy.schorr@eng 2000-06-19 I have opened a new RFE (4526682) for the internal frame version of these methods. Therefore, since the other portion of this bug was integrated some time ago, I am updating the state to integrated. ###@###.### 2001-11-13
2001-11-13