Name: rm29839 Date: 01/22/98 Hello, We really need a way to prevent a JOptionPane from automatically closing when the user presses one of the option buttons. Currently, the JOptionPane has an anonymous class in the 'createDialog()' method that automatically dispose()es of the dialog. Here're two reasons why we need this feature: 1) Many times, even usually, it is necessary to validate user input in a dialog after they press the "OK" button. If the user has entered incorrect data, we want to tell them about it and then send control right back to the dialog so they can make the corrections. I don't want the dialog to be dismissed just to display it again so the user can make corrections. 2) Very often a dialog will have a "Reset" or "Default" button that fills in some standard, pre-defined sets of values. It doesn't seem reasonable to have that dialog dismissed just because a "Reset" button was pressed. The user may very well need to change only a couple values from their standard, defaults. The current implemntation dismisses the dialog as soon as the "Default" button is pressed. If this isn't clear, please let me know. The current implementation of JOptionPane is essentially useless since it automatically dismisses itself. I have a few ideas on how to implement this as well (since I have to do it myself, anyway :) Thanks very much. (Review ID: 23713) ======================================================================
|