Graphical interface (chapter summary)

Source: Internet
Author: User
1. Swing is an extended application based on AWT and provides a set of lightweight operation components.


2. All components in swing start with the letter J, and all components are inherited from the component class.


3. jframe is a standard container provided by swing. You can add components to the container.


4. jlabel is a label component used to display basic information.


5. jbutton is a button component. To build a button that does not pop up, use jtogglebutton.


6. In the graphic interface, flowlayout, borderlayout, gridlayout, cardlayout, and absolute positioning are provided.


7. You can use jtextfield to complete a text box, use jpasswordfield to complete a password box, and use jtextarea to complete a text field.


8. When an event occurs, an event source is generated and corresponding listening programs are found for processing. In the graphic interface, each component provides the corresponding Lister interface for event processing.


9. When using jradiobutton to complete the single-choice operation, you need to add multiple jradiobutton to the buttongroup.


10. jcombobox can be used to display the drop-down list box and jlist can be used to display the list box.


11. To complete the menu display, you need to add multiple jmenus to jmenubar. The Sino-German menu items in the menu are processed using jmenuitem. Each jmenuitem represents a special button.


12. jfilechooser can complete the file selection dialog box.


13. If you want to display a group of data, you can operate it in the form of a cousin.

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.