Introduction - If you have any usage issues, please Google them yourself
Java-based drawing program source code, define the pattern type, record the starting point and end point of the mouse drag, add mouse events, mouse release events, redraw the screen, draw graphics according to the shape value