GUI programming of Java

Source: Internet
Author: User


the library that can be used is AWT , i.e. Abstract Windowtoolkit

Current second generation GUI The development library is Swing , with more sophisticated control support.


Component with the Container is a AWT two of the most important classes in the Component is the parent class of all control classes, and Container is a Window , Frame , Panel such as the parent class of the container class.


layout coordinate system with horizontal direction of x axis, vertical direction is y axis.


The layout manager, which provides coordinates when a control needs to be drawn.

Java The CCP has 5 species: FlowLayout , GridLayout , BorderLayout , CardLayout , GridBagLayout . If you want to customize the layout, you can set it to null.


Event encapsulates a control for a given registered Listener data that is used for handling events.


used in Listener have a WindowListener , ActionListener , MouseListener with the Adjustmentlistener (scroll bar Scrollbar ). Listener is an interface, and if you want to implement such an interface, you must override all methods, thus producing a Adapterthat can optionally override some of the methods.


An inner class that can access private members of an external class.


UI object, which is the control


Choice : drop-down list


Checkbox : Multiple options available


CheckboxGroup : Only Radio


List : Multiple selection lists


Dialog The modal is set to true , a response must be made. In addition,Dialog can not be separated from Frame implementation.




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.