There are 2 code examples for javax.swing.UnsupportedLookAndFeelException.

The API names are highlighted below. You can use suckoo button to vote the code example(s) you like. The best code example will be ranked first next time. Thanks a lot for your feedback.

Project Name: icTAKES Package: edu.mayo.bmi.ctakes.main

Source Code: cTAKESCVDGUI.java (Click to view .java file)

Method Code:
vote
like

public static void main(String[] args){
  try {
    CommandLineParser clp=createCmdLineParser();
    clp.parseCmdLine(args);
    if (!checkCmdLineSyntax(clp)) {
      printUsage();
      System.exit(2);
    }
    String lookAndFeel=null;
    if (clp.isInArgsList(LOOK_AND_FEEL_PARAM)) {
      lookAndFeel=clp.getParamArgument(LOOK_AND_FEEL_PARAM);
      try {
        UIManager.setLookAndFeel(lookAndFeel);
      }
 catch (      UnsupportedLookAndFeelException e) {
        System.err.println(e.getMessage());
      }
    }
    MainFrame frame=createMainFrame();
    if (clp.isInArgsList(TEXT_FILE_PARAM)) {
      frame.loadTextFile(new File(clp.getParamArgument(TEXT_FILE_PARAM)));
    }
    if (clp.isInArgsList(DATA_PATH_PARAM)) {
      frame.setDataPath(clp.getParamArgument(DATA_PATH_PARAM));
    }
 else {
      String dataProp=System.getProperty(RelativePathResolver.UIMA_DATAPATH_PROP);
      if (dataProp != null) {
        frame.setDataPath(dataProp);
      }
    }
    if (clp.isInArgsList(DESC_FILE_PARAM)) {
      frame.loadAEDescriptor(new File(clp.getParamArgument(DESC_FILE_PARAM)));
    }
    if (clp.isInArgsList(TEXT_FILE_PARAM)) {
      frame.loadTextFile(new File(clp.getParamArgument(TEXT_FILE_PARAM)));
    }
    if (clp.isInArgsList(EXECUTE_SWITCH)) {
      frame.runAE(true);
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    System.exit(1);
  }
}
 

Project Name: rmoffice Package: net.sf.rmoffice.ui

Source Code: RMFrame.java (Click to view .java file)

Method Code:
vote
like

private static void setLookAndFeel(){
  try {
    String osName=System.getProperty("os.name");
    if (osName.startsWith("Mac")) {
    }
 else {
      UIManager.setLookAndFeel("com.jgoodies.looks.plastic.PlasticXPLookAndFeel");
    }
  }
 catch (  ClassNotFoundException e) {
    log.error("Can't initialize Look and Feel. Using Java-LaF.",e);
  }
catch (  InstantiationException e) {
    log.error("Can't initialize Look and Feel. Using Java-LaF.",e);
  }
catch (  IllegalAccessException e) {
    log.error("Can't initialize Look and Feel. Using Java-LaF.",e);
  }
catch (  UnsupportedLookAndFeelException e) {
    log.error("Can't initialize Look and Feel. Using Java-LaF.",e);
  }
}