jfilechooser - In java the JFileDialog box will not appear multiple times -
This block of code on your computer will show JFileChooser once instead of just a few times (IM on Mac)
< P> I should be able to show the dialog several times. public class file manager {public static zero main (string array []) {showDirectoryDialog (); Println ("Blocked"); ShowDirectoryDialog (); Println ("Blocked"); } Public Static File Show Directory Dialog () {System.out.println ("Creating Dialog"); Jfile Chooser Chooser = new jfileclosures (); Chooser.setFileSelectionMode (JFileChooser.DIRECTORIES_ONLY); Int returnVal = chooser.showOpenDialog (faucet); System.out.println ("Dialogue"); If (returnVal == JFileChooser.APPROVE_OPTION) {file f = chooser.getSelectedFile (); Return; } Return tap; }}
Edit: If I make a stable example of JFileChooser and continue it, then it works.
Does anyone know why this behavior exists?
EDIT2: I am using OSX 10.9.4 and I was checked to make sure that the second dialog box was not behind any other program. (Unless they hide behind desktop lotles)
Comments
Post a Comment