(i) Drawoval ( ): Drawing Ellipses and circles: To draw an Ellipses or circles used drawOval() method can be used. Syntax: void drawOval(int top, int left, int width, int height) The ellipse is drawn within a bounding rectangle whose upper-left corner is specified by top and left and whose width and height are specified by width and height.To draw a circle or filled circle, specify the same width and height.
Example: g.drawOval(10,10,50,50);
(ii) getFont ( ): It is a method of Graphics class used to get the font property
Font f = g.getFont();
String fontName = f.getName();
Where g is a Graphics class object and fontName is string containing name of the current font.
(iii) drawRect ( ): The drawRect() method display an outlined rectangle.
Syntax: void drawRect(int top,int left,int width,int height)
The upper-left corner of the Rectangle is at top and left. The dimension of the Rectangle is specified by width and height.
Example: g.drawRect(10,10,60,50);
(iv) getFamily ( ): The getfamily() method Returns the family of the font.
String family = f.getFamily();
Where f is an object of Font class