I was just wondering: how does Gmail use the Windows/Mac file chooser to upload files? Is there any way to do this in Java?
Personally, I don't like the way that the JFileChooser
looks like, and I thought it would be better for my users to be able to use something that they're more used to. Tips anyone?
JFileChooser is a part of java Swing package. The java Swing package is part of JavaTM Foundation Classes(JFC) . JFC contains many features that help in building graphical user interface in java . Java Swing provides components such as buttons, panels, dialogs, etc .
JFileChooser fc = new JFileChooser(); int returnVal = fc. showSaveDialog(frame); if (returnVal == JFileChooser. APPROVE_OPTION){ File file = fc. getSelectedFile(); if (file.
Use the old java.awt.FileDialog instead:
new java.awt.FileDialog((java.awt.Frame) null).setVisible(true);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With