java - How do I set the text in it at the beginning when the dialog opens? -
i have following code displays jdialog, shows text field, assume it's jtextfield.
how set text in @ beginning when dialog opens?
joptionpane pane = new joptionpane("", joptionpane.question_message); pane.setwantsinput(true); jdialog dialog = pane.createdialog(null, "test"); dialog.setmodalitytype(dialog.modalitytype.application_modal); dialog.setvisible(true);
use:
pane.setinitialselectionvalue("foo"); to set input value displayed selected user.
Comments
Post a Comment