private void btnSetThemeActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_btnSetThemeActionPerformed

    String themeName = (String) model.get(themeList.getSelectedIndex());
    Preferences.setActiveTheme(themeName);

    try {
      if (!themeName.equalsIgnoreCase("Default")
          || !themeName.startsWith("[Day]")
          || !themeName.startsWith("[Night]")) {
        ConsoleLoader.themeReg.add(ThemeUtils.fabricateThemeFromFile(themeName));
      }
    } catch (IOException ex) {
      Logger.getLogger(WindowThemePreference.class.getName()).log(Level.SEVERE, null, ex);
    }
    ConsoleLoader.themeReg.getNewActive();

    for (Window window : ConsoleLoader.windows) {
      window.recolor();
    }
  } // GEN-LAST:event_btnSetThemeActionPerformed
  @Override
  public void init() {

    super.init();
    for (ITheme theme : ConsoleLoader.themeReg.getThemes()) {
      if (theme != null) {
        model.addElement(theme.getName());
      }
    }

    themeList.setModel(model);

    this.setVisible(true);
  }