Java AWT Question and Answers

33. Which method will cause a Frame to be displayed?
 
  • .show()
  • .setVisible()
 
Your Name Your Email-ID
Your Answer
34. How can we get all public methods of an object dynamically?
 
  • getMethods(): It return an array of method objects corresponding to the public methods of this class.
  • getFields(): It returns an array of Field objects corresponding to the public Fields (variables) of this class.
  • getConstructors: It returns an array of constructor objects corresponding to the public constructors of this class.
 
Your Name Your Email-ID
Your Answer
35. Which component subclass s used for drawing and painting?
  Canvas
 
Your Name Your Email-ID
Your Answer
36. Define canvas?
 
  • It is a simple drawing surface which is used for painting images or to perform other graphical operations.
 
Your Name Your Email-ID
Your Answer
12345678910 Page 9 of 10