Results 1 to 1 of 1
- 10-12-2013, 12:33 AM #1
Member
- Join Date
- Oct 2013
- Posts
- 1
- Rep Power
- 0
JFileChooser - Multiple Instanances
Hi Everyone,
I have a very simple newbie question. I have a method that opens a JFileChooser window where a user can select a file for processing. The method works fine the first time the method is called but it will not be visible the next time the method is called.
Here is a copy of the method.
Java Code:private static String openMyFile(String myCaption) { JFileChooser window = new JFileChooser(); FileFilter DocxFilter = new FileNameExtensionFilter("Docx Files", "docx"); window.setFileFilter(DocxFilter); window.setDialogTitle(myCaption); int returnedValue = window.showOpenDialog(null); if(returnedValue!=JFileChooser.APPROVE_OPTION) { //Check to see if the user clicked the open button System.exit(0); } return window.getSelectedFile().getPath(); }
Similar Threads
-
JFileChooser Multiple selection how to get the canonical path of the each file select
By RichersooN in forum AWT / SwingReplies: 11Last Post: 05-11-2012, 03:19 PM -
JFileChooser
By Madoka in forum New To JavaReplies: 2Last Post: 04-12-2012, 12:06 AM -
One process open multiple threads on multiple CPUs
By kfcnhl in forum Threads and SynchronizationReplies: 2Last Post: 12-12-2011, 09:27 AM -
multiple Data from Jsp that having same name of multiple input tage to servlet
By rahul9323.2007@gmail.com in forum Advanced JavaReplies: 0Last Post: 07-29-2011, 02:00 PM -
how to use JFileChooser
By tommy in forum New To JavaReplies: 1Last Post: 08-06-2007, 09:49 PM
Bookmarks