Rookie Java programmer with a (hopefully) simple question. I'm trying to get the standard JFileChooser to default to the detail view instead of list.
I found this thread that had what I believe is a good answer:
How can I start the JFileChooser in the Details view?
Specifically:
JFrame frame = new JFrame();
JFileChooser fileChooser = new JFileChooser(".");
Action details = fileChooser.getActionMap().get("viewTypeDetails");
details.actionPerformed(null);
fileChooser.showOpenDialog(frame);
But when I implemented it into my program, the compiler says that it cannot find the Action
and details
symbols. I'm thinking the person who answered this question meant for those to be generic placeholders, but I'm not sure what to put in there instead? Thank you and please let me know if you need any other info!