0

想问我如何比较一个文本字段和一个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!");
}
4

0 回答 0