import java.awt.Color;
import java.awt.Graphics;
import javax.swing.JApplet;public class definemethod extends JApplet{
public void paint(Graphics g){
super.paint(g);
myDraw(g, 50, 50, 20);

}

public myDraw(Graphics gg, int centex, int centey, int radius)
{
gg.drawOval(centex - radius, centey - radius, 2 * radius, 2 * radius);
}}************************************************************at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)