Graphics class method to draw rectangle with specified width and height - AWT and Swing
Q. In Graphics class which method is used to draws a rectangle with the specified width and height?- Published on 22 Jul 15a. public void drawRect(int x, int y, int width, int height)
b. public abstract void fillRect(int x, int y, int width, int height)
c. public abstract void drawLine(int x1, int y1, int x2, int y2)
d. public abstract void drawOval(int x, int y, int width, int height)
ANSWER: public void drawRect(int x, int y, int width, int height)