Program: Use function in the applet
Java coding
import java.awt.*;
import java.applet.*;
public class Example extends Applet
{
public void paint(Graphics g)
{
DrawInstructions(g);
}
void DrawInstructions(Graphics g)
{
g.drawString("Hello From ATS Family", 48, 65);
}
}
HTML code
<applet code="Example" widht="300" height="300"></applet>
No comments:
Post a Comment