(Geometry: display an n-sided regular polygon) Define a subclass of JPanel, named RegularPolygonPanel, to paint an n-sided regular polygon. The class contains a property named numberOfSides, which specifies the number of sides in the polygon. The polygon is centered in the panel. The size of the polygon is proportional to the size of the panel. Create a pentagon, hexagon, heptagon, octagon, nonagon, and decagon from RegularPolygonPanel and display them in a frame, as shown in Figure 13.33a.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.