Draw a rectangle

Report a typo

What code is required below to draw a rectangle at rectx, recty, with a width of 10 and a height of 50?

public void paint(Graphics g) {
    super.paint(g);
    int rectX = 40;
    int rectY = 50;
    //draw rectangle here
}
Enter a short text
___

Create a free account to access the full topic