Reputation: 43
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);
Upvotes: 1
Views: 68
Reputation: 2584
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.
Upvotes: 1