Java AWT Question and Answers

9. What is the difference between the paint() and repaint() method?
 
  • The paint() method supports painting via a Graphics object.
  • The repaint() method is used o cause paint() to be invoked by the AWT painting thread.
 
Your Name Your Email-ID
Your Answer
10. What interface is extended by AWT event listener?
 
  • The java.util.EventListener interface is extended by all the AWT event listeners.
 
Your Name Your Email-ID
Your Answer
11. What is a container in a GUI?
  A Container contains and arranges other components through the use of layout managers, which use specific layout policies to determine where components should go as a function of the size of the container.
 
Your Name Your Email-ID
Your Answer
12. What is the default layout for Applet?
 
  • The default layout manager for an Applet is FlowLayout, and the FlowLayout manager attempts to honor the preferred size of any components.
 
Your Name Your Email-ID
Your Answer
12345678910 Page 3 of 10