1

I want this date which have picked form jdateChooser to converted into string and displayed init jlable

java.util.Date date = jDateChooser1.getDate();
date.toInstant();
jLabel16.setText(date);

1 Answers1

1

Use the toString() method, it converts an object to a String, do this jLabel16.setText(date.toString()); to display the contents of the object in the label.

Gherbi Hicham
  • 2,416
  • 4
  • 26
  • 41