Java AWT Interview Questions and Answers - 5

Question: 21

Which containers use a FlowLayout as their default layout?

The Panel and the Applet classes use the Flow Layout as their default layout.

Question: 22

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.

Question: 23

Which component subclass s used for drawing and painting?

Canvas

Question: 24

Which container may contain a menu bar?

Frame

Related Questions