java - Clear file name when enter directory name and enter -
i'm working on opening file using jfilechooser
here code
jfilechooser filechooser = new jfilechooser(); filechooser.setacceptallfilefilterused(false); filenameextensionfilter filter = new filenameextensionfilter("ff files", "ff"); filechooser.addchoosablefilefilter(filter); int result = filechooser.showdialog(null, "pp");
on button click event these code running, normal code guess. when click it, jfilechooser dialog appears. if enter directory name in file name
field (ex. sam) , hit enter
, enters directory, text field still shows entered text i.e 'sam' tried same flow in notepad , in eclipse, in phase, 'sam' getting cleared can provide directory name , hit enter.
correct me if code wrong, if problem duplicate, apology wasted time.
notepad , eclipse use different implementation jfilechooser
. that´s why might behave different , don´t think can make work expecting (instead of using custom library or making own implementation).
Comments
Post a Comment