Java Swing Question and Answers

21. Which container method is used to cause a container to be laid out and redisplayed?
  validate()
 
Your Name Your Email-ID
Your Answer
22. Name the containers which use Border Layouts as their default layout?
 
  • Window
  • Frame and
  • Dialog classes
 
Your Name Your Email-ID
Your Answer
23. What do heavy weight components mean?
 
  • Heavy weight components like Abstract Window Toolkit (AWT) depend on the local windowing toolkit.
  • For example, java.awt. Button is a heavy weight component.
 
Your Name Your Email-ID
Your Answer
24. What is the purpose of the enableEvents() method?
 
  • The enableEvents() method is used to enable an event for a particular component.
  • Normally, an event is enabled when a listener is added to an object for a particular event.
  • The enableEvents() method is used by objects that handle events by overriding their event dispatch methods.
 
Your Name Your Email-ID
Your Answer
123456789 Page 6 of 9