将jdatechooser与jtextfield进行比较

时间:2014-03-23 05:07:50

标签: java netbeans jdatechooser

想问一下如何将文本字段与JDateChooser进行比较?

if ((JTextField)jDateChooser1.getDateEditor().getUiComponent()).getText() < txtdate) { 
    JOptionPane.showMessageDialog(null, "Cant choose a date that is more previous >than the present date!"); 
} else { 
    JOptionPane.showMessageDialog(null, "Book Successfully Borrowed!");
}

0 个答案:

没有答案