JCalendar getting date
问题 In my project I am using com.toedter.calendar.JCalendar class. But I do not know how can I get date when date is chosen. JDateChooser and JXDatePicker met my need. There is a code that provides date when a date is chosen from JDateChooser. JDateChooser picker=new JDateChooser(); picker.addPropertyChangeListener(new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent evt) { setDate(picker.getDate()); } }); 回答1: You definitely want addPropertyChangeListener() ,