Java AWT Question and Answers

29. What are the subclasses of the Container class?
  The container class has three major subclasses. They are
  • Window
  • Panel
  • ScrollPane
 
Your Name Your Email-ID
Your Answer
30. Which method is method to set the layout of a container?
  setLayout ()
 
Your Name Your Email-ID
Your Answer
31. What are the default layouts for a applet, a frame and a panel?
  For an applet and a panel, Flow layout, and The FlowLayout manager attempts to honor the preferred size of any components.
 
Your Name Your Email-ID
Your Answer
32. What is the difference between a Scrollbar and a Scrollpane?
 
  • A Scrollbar is a component, but not a container.
  • A Scrollpane is a container.
  • A Scrollpane handles its own events and performs its own scrolling.
 
Your Name Your Email-ID
Your Answer
12345678910 Page 8 of 10