Page 212 - CTS - CSA TP - Volume 2
P. 212
COMPUTER SOFTWARE APPLICATION - CITS
add(lastNameTF);
add(dobTF);
add(maleCheckbox);
add(femaleCheckbox);
add(otherCheckbox);
add(new Label(“Gender”));
add(hobbiesList);
add(sbmt);
add(reset);
// Adding window close event handling
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent windowEvent) {
System.exit(0);
}
});
setSize(300, 300);
setLayout(null);
setVisible(true);
}
public static void main(String[] args) {
AwtApp awt = new AwtApp();
}
}
Output:
197
CITS : IT & ITES - Computer Software Application - Exercise 116