Java AWT Question and Answers

37. What is the difference between the Font and FontMetrics classes?
  The FontMetrics class is used to define implementation specific properties such as ascent and descent, of a Font object.
 
Your Name Your Email-ID
Your Answer
38. Explain the use of update method?
 
  • An update method is called on calling the repaint method.
  • The default implementation of the update() method clears the screen and calls the paint() method.
 
Your Name Your Email-ID
Your Answer
39. Which containers use a FlowLayout as their default layout?
  The Panel and the Applet classes use the Flow Layout as their default layout.
 
Your Name Your Email-ID
Your Answer
40. What are the subclass of textcomponent class?
  TextField and TextArea
 
Your Name Your Email-ID
Your Answer
12345678910 Page 10 of 10