Java GUI Programming

Source: Internet
Author: User
1. Graphical User Interfacejava objects that are provided for the GUI exist in Java. AWT and javax. Swing two packages in Java.  Awt:abstract window Toolkit Abstract Windows Toolkit needs to invoke Local System method implementation functions, poor portability, dependent system. Heavy-weight control javax. Swing's set of graphical interface systems, based on AWT, provides more components that are fully implemented by Java. Good portability, lightweight control eclipse is an SWT-developed Component: Component container: Container panel: faceplate Frame: Frame Dialog: Dialog checkbox checkbox: check box 2. The Layout Manager container's components are emitted by the layout. Common layout Manager: FlowLayout Flow layout: Left-to-right order, panel default layout manager borderlayout Boundary Layout manager: East, frame default layout manager GridLayout Grid layout Manager : Rule grid cardlayout card layout Manager: Tab gridbaglayout Grid package Layout Manager: Irregular grid 3. Basic steps to create a graphical interface: 1. Create a Form 2. Basic setup of the Form 3. Define component 4. Add the component to the form 5. Set the Visualize 4. Event Monitoring mechanism features: 1. Event Source: The graphical interface component in the AWT package or swing package 2. Events: Each event source has its own unique corresponding event and commonality event 3. Listener: Actions that can trigger an event are already encapsulated in the listener--- The above 3 are defined in Java 4. Event handling:

Java GUI Programming

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.