void () { DateFormatSymbols dateFormatSymbols = new DateFormatSymbols(Locale.getDefault()); for (int i = Calendar.JANUARY; i <= Calendar.DECEMBER; i++) myMonths.addItem(dateFormatSymbols.getMonths()[i]); myMonths.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { refresh(); } }); }