- Model (model): an object used to store data.
View (view): The object that provides the data display for the model.
Controller (Controller): handles user interactions, responds to user actions, allows the model and view to interact as necessary, by modifying the view, getting data from the model, and letting the view update when the data in the model changes.
- in the constructor of the grid layout object, you need to specify the number of rows and columns:panel.setlayout (New GridLayout (x, y));
- Creating a message dialog box
- static methods for the Joptionpane class in the javax.swing package :
public static void Showmessagedialog (
Component Parentcomponent,
String message,
String title,
int messageType)
(1)Syntax Format: Label (String s)
(2)function: constructs a display strings's identity.
2.Button(Button)
(1)Syntax Format: Button (String s)
(2)function:constructs a stringsthe button to be identified.
3.check box(Checkbox)
(1)Syntax Format: Checkbox (String s)
(2)function:constructs a stringsthe check box entry for the identity is not selected.
4.radio Button(Radio Buttons)
(1)Syntax Format: CheckboxGroup ()
(2)function: constructs a group of entries.
5.Select Menu(Choice Menu)
(1)Syntax Format: Choice ()
(2)function:constructs a selection menu.
(3)Description:after the construction, then useChoicein the classAddItemmethod to add an entry to the menu.
6.list Box(scrolling List) L
(1)Syntax Format: List (int n, boolean b)
(2)function:constructs aNList items, and according to thebvalue Determines whether multiple selections are allowed.
7.Single line text input box(TextField)
(1)Syntax Format: TextField (int i)
(2)function:constructs a string length ofISingle line text input box
8.Multi-line text input box(TextArea)
(1)Syntax Format: TextArea (int i, int j)
(2)function: constructs a multiline text input box,the number of rows isI,number of columns isJ
201671010130 2016-2017-2 "Java Programming" 14th Week study Summary