previous
|
start
|
next
Turn Rectangle Applet into Application
Make class
RectanglePanel
paintComponent
method paints the rectangle at current location
Panel should store the data that it needs to paint itself
public class RectanglePanel
{
. . .
private Rectangle box;
}
Mouse listener changes location of rectangle
previous
|
start
|
next