chunkII123
IS-IT--Management
Alright, I have a action performed on okButton click, essentially I need it to be possibly a nested try-catch block. With that said, heres whats going on - Right now it looks like this
This makes it functional, but not exactly how I need it or want it; I have been having one heck of a time for the past three days trying to get it to work, but it's not quite working - I need it to throw an exception if the memNumField is blank, the matchesMemNumField, or the dateSchedule field == null. Or any combination of them, like, the dates missing and the other two are filled, etc... or whatever.
Any help is much appreciated, and thank you for reading.
Beware of hackers bearing executables. Happy Hunting. 'irc.2600.net'
Code:
try {
if (memNumField != null && matchesMemNumField != null) {
if (dateScheduledField != null) {
int memberNumber = Integer.valueOf(memNumField.getText());
int matchesMemberNumber = Integer.valueOf(matchesMemNumField.getText());
String date = dateScheduledField.toMySQLFormat();
scheduledMatches.updateMatches(memberNumber, matchesMemberNumber, date);
}
}
} catch (Exception exc) {
exc.printStackTrace();
String warningMessage = "The member number, the matches member number, or the date scheduled was left blank, please try again.";
WarningMessage warning = new WarningMessage(true, warningMessage, WarningMessage.NON_CRITICAL_ERROR);
warning.setVisible(false);
JOptionPane.showMessageDialog(this, warningMessage, "Error", JOptionPane.INFORMATION_MESSAGE);
}
if (parent instanceof MatchedMembersForm) {
MatchedMembersForm m = (MatchedMembersForm) parent;
m.loadTables();
}
doClose(RET_OK);
}
This makes it functional, but not exactly how I need it or want it; I have been having one heck of a time for the past three days trying to get it to work, but it's not quite working - I need it to throw an exception if the memNumField is blank, the matchesMemNumField, or the dateSchedule field == null. Or any combination of them, like, the dates missing and the other two are filled, etc... or whatever.
Any help is much appreciated, and thank you for reading.
Beware of hackers bearing executables. Happy Hunting. 'irc.2600.net'