Question -
What is the length of the application box made by this program?
import java.awt.*;
import java.applet.*;
public class myapplet extends Applet {
public void paint(Graphics g) {
g.drawString("A Simple Applet", 20, 20);
}
}
Answer: Option A the code in pain() method - g.drawString("A Simple Applet",20,20); draws a applet
box of length 20 and width 20.
Was this answer helpful ?
Submit Your Solution hear: