Java – how do I start Jfilechooser in the details view?
•
Java
I want my Jfilechooser to start with the details view instead of the list view it starts with How do you do it?
Solution
You can get action from actionmap:
JFrame frame = new JFrame();
JFileChooser fileChooser = new JFileChooser(".");
Action details = fileChooser.getActionMap().get("viewTypeDetails");
details.actionPerformed(null);
fileChooser.showOpenDialog(frame);
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码
