• ( 1 ) Which life cycle method of an applet java.awt.Component class provides?

    • 1) public void paint(Graphics g)
    • 2) public void destroy()
    • 3) public void stop()
    • 4) public void init()
    • Discussion in forum
      Answer : 1) public void paint(Graphics g)
      Solution :








      discussion


      Answer : 1) public void paint(Graphics g)

    • ( 2 ) Which of the following methods is defined by the Applet class?

    • 1) init()
    • 2) paint()
    • 3) start()
    • 4) None of these
    • Discussion in forum
      Answer : 4) None of these
      Solution :








      discussion


      Answer : 4) None of these

    • ( 3 ) The(0,0) coordinates of applet window is located at_______

    • 1) at the center of the applet
    • 2) at the center of the right edge of the applet
    • 3) at the center of the left edge of the applet
    • 4) at the upper-left corner of the applet
    • Discussion in forum
      Answer : 4) at the upper-left corner of the applet
      Solution :








      discussion


      Answer : 4) at the upper-left corner of the applet

    • ( 4 ) Which Invoked immediately after the start() method, and also any time the applet needs to repaint itself in the browser?

    • 1) stop()
    • 2) init()
    • 3) paint()
    • 4) destroy()
    • Discussion in forum
      Answer : 3) paint()
      Solution :








      discussion


      Answer : 3) paint()

    • ( 7 ) When an applet begins, the AWT calls the following methods, in this sequence?

    • 1) init(),paint(),start()
    • 2) Start(),paint(),init()
    • 3) intit(),start(),paint()
    • 4) paint(),start(),init()
    • Discussion in forum
      Answer : 3) intit(),start(),paint()
      Solution :








      discussion


      Answer : 3) intit(),start(),paint()

    • ( 8 ) Which method is first Called for any applet when it starts its execution?

    • 1) void init()
    • 2) void destroy()
    • 3) boolean isActive()
    • 4) None of these
    • Discussion in forum
      Answer : 1) void init()
      Solution :








      discussion


      Answer : 1) void init()

    • ( 9 ) Which of the following methods set the frame surface color to pink?

    • 1) setBackground(Color.pink);
    • 2) setColor(PINK);
    • 3) Background(pink);
    • 4) None of these
    • Discussion in forum
      Answer : 1) setBackground(Color.pink);
      Solution :








      discussion


      Answer : 1) setBackground(Color.pink);

    • ( 10 ) Which of the following statements about hierarchy of the class java.awt.Applet is incorrect?

    • 1) An applet is a kind of container
    • 2) An applet is a kind of window
    • 3) An applet is a kind of component
    • 4) An applet is a kind of panel
    • Discussion in forum
      Answer : 3) An applet is a kind of component
      Solution :








      discussion


      Answer : 3) An applet is a kind of component





Top