I have a jFrame in my java application which inserts the selected date into the database. I want to validate if field is empty.
The code is like this:
if(!this.jtxtDate.getSelectedItem.toString().isEmpty()) {
idc.setDate(this.jtxtDate.getDate);
} else {
JOptionPane.showMessageDialog(rootPane, "pls choose date");
}