ColoredListCellRenderer<Locale> () { return new ColoredListCellRenderer<>() { @Override protected void customizeCellRenderer(@NotNull JList list, Locale locale, int index, boolean selected, boolean hasFocus) { if (PropertiesUtil.DEFAULT_LOCALE == locale) { append(PropertiesBundle.message("create.resource.bundle.default.locale.presentation")); } else { append(myLocaleSuffixes.getOrDefault(locale, locale.toString())); append(PropertiesUtil.getPresentableLocale(locale), SimpleTextAttributes.GRAY_ATTRIBUTES); } } }; }