i'm trying to get the selected date from Jdatechooser and display the age corresponding to the date in a Textfield, i saw all the threads discussing this problem but it doesn"t work for me.here is my code:
private void datenaiss_choozPropertyChange(java.beans.PropertyChangeEvent evt) {
Date date = (Date) datenaiss_chooz.getDate();
LocalDate ld = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
Period p =Period.between(ld, LocalDate.now());
age.setText(p);
}