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

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -