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