我正在尝试以日(数字)月(字),年(数字)的格式获取日期,但其显示错误请帮助编码:
lb_date.setText(Calendar.getInstance().getDate().toString());
public menu() {
initComponents();
lb_date.setText(Calendar.getInstance().getTime().toString());
Timer t = new Timer(true);
lb_des_de.setVisible(false);
lb_des_cert.setVisible(false);
lb_des_rep.setVisible(false);
lb_des_help.setVisible(false);
lb_entry.setVisible(false);
lb_cert.setVisible(false);
lb_report.setVisible(false);
lb_help.setVisible(false);
t.scheduleAtFixedRate(new TimerTask() {
@Override
public void run() {
lb_date.setText(Calendar.getInstance().getTime().toString());
}
}, 1000, 1000);
}