Home » JAVA Programming » Applet » Question
  1. What is the length of the application box made by this program?
    import java.awt.*;
    import java.applet.*;
    public class TextApplet extends Applet
    {
    public void paint(Graphics g)
    {
    g.drawString("A Simple Applet created...", 50, 50);
    }
    }
    1. 20
    2. 30
    3. 40
    4. 50
    5. 60
Correct Option: D

the code in paint() method – g.drawString(“A Simple Applet created...”,50,50); draws a applet box of length 50 and width 50.



Your comments will be displayed only after manual approval.