addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
dispose();
System.exit(0);
}
});
// Set the details for an InPatient
ip2.setInPatientDetails("Fred Smith", 70, "wm123c", 0, "Otter Ward");
// Set the details for an OutPatient
p1.setPatientDetails("June Smith", 66 , "AB1234D");