java - How to change the title of the JFileChooser dialogbox -


i used jfilechooser.showopendialog open dialog box. when show up, there "open" on title of dialog box. want change "add" because code adding new file. tell me how it. in advance.

there dialog box. enter image description here

jfilechooser's showopendialog not give option change title of dialog box (see docs). have use bit more code that. code example in documentation comes close:

jfilechooser chooser = new jfilechooser(); filenameextensionfilter filter = new filenameextensionfilter(     "jpg & gif images", "jpg", "gif"); chooser.setfilefilter(filter); chooser.setdialogtitle("add new file"); int returnval = chooser.showopendialog(parent); 

Comments

Popular posts from this blog

python 3 IndexError: list index out of range -

android - How to save instance state of selected radiobutton on menu -

IF statement in MySQL trigger -