Пример #1
0
  /**
   * @param args
   * @throws SshToolsApplicationException
   */
  public void init(String[] args) throws SshToolsApplicationException {
    File f = getApplicationPreferencesDirectory();

    if (f != null) {
      //
      PreferencesStore.init(new File(f, getApplicationName() + ".properties"));
      log.info("Preferences will be saved to " + f.getAbsolutePath());
    } else {
      log.warn("No preferences can be saved.");
    }

    try {
      setLookAndFeel(PreferencesStore.get(PREF_LAF, SYSTEM_LAF));

      UIManager.put(
          "OptionPane.errorIcon", new ResourceIcon(SshToolsApplication.class, "dialog-error4.png"));
      UIManager.put(
          "OptionPane.informationIcon",
          new ResourceIcon(SshToolsApplication.class, "dialog-information.png"));
      UIManager.put(
          "OptionPane.warningIcon",
          new ResourceIcon(SshToolsApplication.class, "dialog-warning2.png"));
      UIManager.put(
          "OptionPane.questionIcon",
          new ResourceIcon(SshToolsApplication.class, "dialog-question3.png"));
    } catch (Throwable t) {
      log.error(t);
    }
  }