我需要将当前日期设置为 jdatechooser 此代码不起作用

I need to set the curent date to jdatechooser this code is not working

我需要将当前日期设置为jdatechooser 这个代码是 不工作

Date date = new Date ();
Jdatechooser.setDate(date);

您需要一个日期选择器对象。

Date date = new Date ();
JDateChooser dateChooser = new JDateChooser();
dateChooser.setDate(date);