So I\'m making a program selection tool, and currently i like the way everything looks with just the java look and feel. the only thing i want to change is the JFileChooser
All that is needed is to change the UIManager while creating the JFileChooser Object, then setting it back to what it was previously, alternatively you could just catch Exception, but that is bad practice.
public void stuff(){
JFileChooser chooser = null;
LookAndFeel previousLF = UIManager.getLookAndFeel();
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
chooser = new JFileChooser();
UIManager.setLookAndFeel(previousLF);
} catch (IllegalAccessException | UnsupportedLookAndFeelException | InstantiationException | ClassNotFoundException e) {}
//Add whatever other settings you want to the method
chooser.showOpenDialog(frame);
}