ericire Posted October 22, 2012 Posted October 22, 2012 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 "";
Recommended Posts
This topic is 4484 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now