/**
   * Creates the language combo box, attempts to guess an appropriate *available* locale to select,
   * and sets the application locale to that match.
   */
  private JComboBox createLanguageDropDown(Font normalFont) {
    final JComboBox languageDropDown = new JComboBox();
    Locale[] locales = LanguageUtils.getLocales(normalFont);
    languageDropDown.setRenderer(new LocaleRenderer());
    languageDropDown.setFont(smallFont);
    languageDropDown.setModel(new DefaultComboBoxModel(locales));

    // Attempt to guess the default locale and set accordingly
    languageDropDown.setSelectedItem(LanguageUtils.guessBestAvailableLocale(locales));

    // Make sure the drop down and the set locale match.  This may cause the default OS
    //  language to be overridden to English in the case of a bad guess.  This has always been
    //  a problem but in this case at least it will be obvious that the users language is being
    //  overridden.
    LanguageUtils.setLocale((Locale) languageDropDown.getSelectedItem());

    languageDropDown.addItemListener(
        new ItemListener() {

          @Override
          public void itemStateChanged(ItemEvent e) {
            if (e.getStateChange() == ItemEvent.SELECTED) {
              Locale locale = (Locale) languageDropDown.getSelectedItem();
              LanguageUtils.setLocale(locale);
              setTextContents();
            }
          }
        });

    return languageDropDown;
  }