201671010130 2016-2017-2 "Java Programming" 14th Week study Summary

Source: Internet
Author: User

    • 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. logo (label)

(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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.