Java Advanced Learning (eight) GUI

Source: Internet
Author: User

The GUI (graphical user Interface) provides a graphical interface that allows users to interact with the system in a graphical manner. Before the GUI is promoted, the user usually controls the computer in the form of a text command. GUI visually renders the functions of the computer to the user, reducing the threshold for users to use the computer. Apple and Microsoft are the GUI pioneers (though they have copied Xerox to some extent), and the GUI has brought a huge market return for the two-PC kings.

Early Mac GUI

The GUI requires the support of the operating system and hardware. Therefore, GUI programming often has to deal with porting problems. Java GUI programming has relatively good portability. However, as the focus of the GUI shifts to the mobile end, the GUI part of Java is somewhat awkward. In any case, we can use Java to understand some of the basic aspects of GUI programming.

The understanding of graphics

Look at a picture below:

Kturtle Drawing. See, make your child a code farmer.

As you can see, there is a house, a house with windows and doors, stripes on the windows, a handle on the door, and a small turtle outside the image. We refer to houses, windows, doors, stripes, and handles that can be called objects. Different objects have a combination (composition) relationship, such as windows and doors belonging to the house, while the handle belongs to the door. The tortoise and the house are mutually independent two objects. In addition, there is a box outside the entire image to indicate the scope of the drawing, and all the elements mentioned above are attached to the box.

On the other hand, the above objects have many graphical elements (component) that are reused. For example, the handle is a circle, and the house and door are made of straight lines. The same graphic elements can be grouped into one class (class). We can use the line class repeatedly to generate (different) lines and combine them into different objects.

This is an object-oriented approach to understanding a graphic. Objects are a natural way of describing graphics. Object-oriented programming has been very successful in the application of computer graphics.

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/Programming/Java/

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.