• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

JFileChooser CUSTOM_DIALOG issue

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using JFileChooser CUSTOM_DIALOG one. Here is the snippet of the code :

fileChoose = new JFileChooser();
fileChoose.setDialogType(JFileChooser.CUSTOM_DIALOG);
fileChoose.setMultiSelectionEnabled(false);
fileChoose.setFileSelectionMode(JFileChooser.FILES_ONLY);
fileChoose.setControlButtonsAreShown(false);
fileChoose.addPropertyChangeListener(this);

Here I have disabled the default buttons. I am using my customized one. When I select the file in the FileChooser I am able to retrieve the filename by using the below method as expected.

fileChoose.getSelectedFile();

But, the typed filename in the "File Name" textfield of the FileChooser is not getting reflected in the fileChoose.getSelectedFile() method.It is always providing the previously selected filename not the typed one in the text field. Please share your thoughts.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!