50 likes | 277 Views
Main Window vs. Dialog Box. Main Window. Dialog Box. Initialization. Result. Dialog Box. Modal and modeless dialog box Common and custom dialog boxes Bring up and down a dialog box Initialization from main window to dialog box Data returning from the dialog box GUI components (Controls)
E N D
Main Window vs. Dialog Box Main Window Dialog Box Initialization Result
Dialog Box • Modal and modeless dialog box • Common and custom dialog boxes • Bring up and down a dialog box • Initialization from main window to dialog box • Data returning from the dialog box • GUI components (Controls) • OK and Cancel in a modal dialog box
GUI Components(Controls) • Label, Textbox, Button, Check Box, Radio Button, List, … • Properties and event handlers of GUI components
Controls in Java (1) • Control Properties in common: (Name), Text, Location, Size, Visible, Enabled • JLabel: (getText, setText) • JButton(getText, setText; ActionListner: actionPerformed) • JTextField(getText, setText; ActionListner: actionPerformed)