6. Which object can be constructed to show any number of choices in
the visible window? Labels Choice List Checkbox
7. Which method can set or change the text in a Label?
setText() getText() All the above None of the above
8. Which is the container that doesn't contain titlebar and MenuBars.
It can have other components like button, textfield etc ?* Window Frame Panel Container
9. These two ways are used to create a Frame 1) By creating the
object of Frame class (association) 2) By extending Frame class (inheritance) True False
10. Which of the following are acceptable? ( Choose two) 1)
Object o = new Button(""A""); 2) Boolean flag = true; 3) Panel p = new Frame(); 4) Frame f = new Panel(); 5) Panel p = new Applet(); 1 and 5 1 and 2 1 and 3 1 and 4
11. AWT stands for___
Applet Windowing Toolkit Abstract Windowing Toolkit Absolute Windowing Toolkit None of the above
12. Which class provides many methods for graphics
programming? java.awt java.Graphics java.awt.Graphics None of these
13.Where are the following four methods commonly used?1)
public void add(Component c) 2) public void setSize(int width,int height) 3) public void setLayout(LayoutManager m) 4) public void setVisible(boolean) Graphics class Component class Both A & B None of the above
14. Which of the following is true about applet ?
Applets do not have main() method Applets must run under appletviewer or web browser The user I/O is not performed using Java's stream I/O class all of these 15. Which is the container that doesn't contain title bar and MenuBars but it can have other components like button, textfield etc? Window Frame Panel Container 16. Which is used to store data and partial results, as well as to perform dynamic linking, return values for methods, and dispatch exceptions? Window Panel Frame Container
17. By which method we can set or change the text in a Label
in AWT? setText() getText() addText() all of these
18. Which is a component in AWT that can contain another
19. Which of the following statements are true? a) The default
layout manager for an Applet is FlowLayout b) The default layout manager for an application is FlowLayout c) A layout manager must be assigned to an Applet before the setSize method is called d) The FlowLayout manager attempts to honor the preferred size of any components a b c a and d 20. Which of the following may a menu contain?a) A separator b) A check box c) A menuitem d) A button a b c a and c