private static void setupLookAndFeel() { // set up system Look&Feel try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (Exception e) { RiskUtil.printStackTrace(e); } // only do this check if there is NO sandbox // as otherwise we will get an exception anyway if (checkForNoSandbox()) { // check for java bug with JFileChooser try { new JFileChooser(); } catch (Throwable th) { try { UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); } catch (Exception e) { RiskUtil.printStackTrace(e); } } } /* OLD // set up system Look&Feel try { String os = System.getProperty("os.name"); String jv = System.getProperty("java.version"); if ( jv.startsWith("1.4.2") && os != null && os.startsWith("Linux")) { UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel"); } else { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } } catch (Exception e) { RiskUtil.printStackTrace(e); } */ }
public static String getNewMap(Frame f) { try { if (checkForNoSandbox()) { List mapsList = getFileList(RiskFileFilter.RISK_MAP_FILES); // try and start new map chooser, // on fail revert to using the old one return SwingMEWrapper.showMapChooser(f, mapsList); } } catch (Throwable th) { RiskUtil.printStackTrace(th); } // can not have the map store, fall back to normal map chooser return getNewFile(f, RiskFileFilter.RISK_MAP_FILES); }