Learning notes Java Graphic Design Volume I awt--3rd Chapter graphics

Source: Internet
Author: User
-->
-->

Learning notes Java Graphic Design Volume I awt--3rd Chapter graphics

Before the monitor broke down, file://wrote preface: I think it is not to learn notes, like a tutorial. I wanted to get something, so I had a little detail.
Note 1: User interface artifacts (such as buttons, lists, menus, dialog boxes, and so on) provided in AWT do not contain similar purely object drawing objects (such as line or circle classes)

The original AWT does not allow pure drawing objects to be designed, so rectangle, polygon, and point do not have any ability to draw graphics. Other words
Rectangle, Polygon, and point do not have draw methods. What you can do is simply to set and get information about the geometric entities they represent.
To replace pure, graphically-drawn objects, AWT uses a simple-albeit inflexible and easily extensible-pattern:
Each AWT widget is entirely derived from its own JAVA.AWT.Graphics object, although some of its graphical operations can be implemented in the artifacts associated with it.
Graphics can also be drawn to a variety of output devices, such as external buffers and printers-see the 24th chapter, "Double Buffering Technology" and section 18.4, "print" related content.

Please look at both tables (ignoring the JAVA.AWT.peer method):

Table 3-1 The JDK method that passes a reference to graphics
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Package class method
────────── ───────────────────────
JAVA. AWT Canvas Paint (Graphics g)
Component paint (Graphics g)
Component Paintall (graphi     CS g)
Component print (Graphics g)
Component printall (Graphics g)
Component         Update (Graphics g)
Container paint (Graphics g)
Container paintcomponents (Graphics g)
Container print (Graphics g)
Container printcomponents (Graphics g)
ScrollPane p Rintcomponents (Graphics g)

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.