Vision Watch Project Development notes

Source: Internet
Author: User

1, the angle of rotation of the image can be calculated using the Toradians method of the math class

2, the image or the length of the panel is measured in pixels

3, Draw the text on the panel to use the graphics class, draw pictures or special operations on the picture to use the drawImage method of the Graphics2D class

4, The FillRect method of the Graphics (2D) class is to draw a region of the specified color (setcorlor) on the panel,setcolor Method can be interpreted as setting the brush color

5, in the project inside the picture or other file resources, to access the specified file, you want to use the class name . Class.getResource (the address of the file in the project ) get the image or the path of the file to visit again

6, theDouble type addition retains the post-decimal N -bit, and the workaround is to use the DecimalFormat class to format it. For example:

Note the data format after format is a String type, which is double. Parsedouble convert it back to double type

Vision Watch Project Development notes

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.