October 22, 201213 yr hi some times using new JFileChooser(), the prompt is not in front of filemaker application but over an other application how can I force it ? import javax.swing.JFileChooser; JFileChooser chooser = new JFileChooser(); chooser.setFileSelectionMode( JFileChooser.DIRECTORIES_ONLY ); //You can switch this to JFileChooser.FILES_ONLY or JFileChooser.FILES_AND_DIRECTORIES if you want the user to be able to pick files if( startingPath != null ) chooser.setCurrentDirectory( new File(startingPath) ); if( prompt != null ) chooser.setDialogTitle( prompt ); if( chooser.showOpenDialog( null ) == JFileChooser.APPROVE_OPTION ) { return chooser.getSelectedFile().getAbsolutePath(); } else return "";
Create an account or sign in to comment