Control of Java layouts

Source: Internet
Author: User
Tags html page

In Java, this method is a component to a form, it is different from the other GUI systems we have used.

First, it is full code; there is no "resource" to control the placement of components.

Second, the component of the method is placed in a form that is controlled by the layout manager, and the layout manager places the component according to the decisions we add (). Size, shape, and component locations are significantly different from the layout managers of other systems. In addition, the layout manager makes our patches or applications fit the size of the window, so if the size of the window changes (for example, the specification specified in the HTML page's program), the size, shape, and position of the component change.

Both the program slice and the frame class originate from the container that contains and displays the component. (This container is also a component, so it can respond to events as well.) In the container, calling the SetLayout () method allows me to select a different layout manager.

In this section we'll explore different layout managers and put buttons on top of them. There is no event to capture the button, just to show how to lay out the buttons.

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.