Example #1
0
  private void configureUI() {
    // UIManager.put("ToolTip.hideAccelerator", Boolean.FALSE);
    Options.setDefaultIconSize(new Dimension(18, 18));
    Options.setUseNarrowButtons(settings.isUseNarrowButtons());
    Options.setTabIconsEnabled(settings.isTabIconsEnabled());
    UIManager.put(Options.POPUP_DROP_SHADOW_ENABLED_KEY, settings.isPopupDropShadowEnabled());

    // Swing Settings
    LookAndFeel selectedLaf = settings.getSelectedLookAndFeel();

    // Work around caching in MetalRadioButtonUI
    JRadioButton radio = new JRadioButton();
    radio.getUI().uninstallUI(radio);
    JCheckBox checkBox = new JCheckBox();
    checkBox.getUI().uninstallUI(checkBox);

    try {
      UIManager.setLookAndFeel(selectedLaf);
      SwingUtilities.updateComponentTreeUI(this);
    } catch (UnsupportedLookAndFeelException uslafe) {
      System.out.println("UnsupportedLookAndFeelException: " + uslafe.getMessage());
    } catch (Exception e) {
      System.out.println("Can't change L&F: " + e);
    }

    // // FensterIcon
    // String IconLocation = ResourceManager.getString("icon.IconImage");
    // System.out.println("[i] set IconImage: " +
    // getClass().getResource(IconLocation).toString());
    // setIconImage( new
    // ImageIcon(getClass().getResource(IconLocation)).getImage());

  }