private static boolean isMac = System.getProperty("os.name").startsWith("Mac");
private static void getXPlatformLook(JFileChooser fc) {
if (isMac) {
LookAndFeel lnf = UIManager.getLookAndFeel();
// JFileChooser on Mac OS X with the native L&F doesn't work well.
// If the native L&F of Mac is selected, disable it for the file chooser
if (lnf.isNativeLookAndFeel()) {
try {
UIManager.setLookAndFeel(UIManager
.getCrossPlatformLookAndFeelClassName());
} catch (Exception e) {
e.printStackTrace();