AJP Unit-I ByOmiii
AJP Unit-I ByOmiii
Program: CO5I Course: Advanced Java Programming (22517) Course Co-ordinator: Mrs.Chavan P.P.
Unit I- Abstract Window Toolkit
Question Bank
1 Give the Abbreviation of AWT : Applet WindowingToolkit Abstract Window Absolute Windowing Toolkit None of these
Toolkit
Which is a component in AWT that can contain another components like
2 Window Container Panel Frame
buttons, textfields, labels etc.?
8 Applet can be embedded in . HTML document word document gif file rtf file
What does the following line of code do ? Creates text object that can Creates text object that Creates the object text and
10
can hold 20 columns of initializes it with the value 20 This is invalid code
Textfield text = new Textfield(20); hold 20 rows oftext.
text.
11 Executable applet is .applet file .java html .java file .class file
12 Java applet are used to create applications. graphical user interactive both (a) and (b) none of the above
16 Which of the following class is derived from the container class? Component Panel MenuComponent List
Which of these classes can be added to any Container class, using the add
19 Button CheckboxMenuItem Menu MenuBar
method defined in Container class?
These two ways are used to create a Frame 1. By creating the object of
22 TRUE FALSE
Frame class (association) 2. By extending'Prame class (inheritance)
23 The title of the frame can be set in AWT using the method. setHeading setTitle CreateTitle Settitle
Which are passive controls that do not support any interaction with the
24 Choice List Label Checkbox
user?
29 The most commonly used layout managers are FlowLayout GridLayout BorderLayout All of these
30 The subclasses of Window are Dialog Frame Both a & b None of these
31 Default layout manager for subclasses of window is _ cardlayout GridBaglayout Frame BorderLayout
32 Each menu is associated with a list of menu items: Checkbox Drop-down Choice None of these
Which class can be used to represent a checkbox with a textual label that
33 MenuBar MenuItem CheckboxMenuIte Menu
can appear in a menu ?
m
34 Which abstract class is the super class of all menu related classes? MenuComponent MenuBar MenuItem CheckboxMenuItem
36 Dialog box does not have minimize and maximize button TRUE FALSE
A dialog box is referred to as modeless if the user does not have to close it
37 TRUE FALSE
in order to continue using the application that owns the dialog box.
38 The class displays a dialog window from which the user can select a file. Dialog FileDialog File None of these
new TextArea(new
40 Which constructor creates a TextArea with 10 rows and 20 columns? Rows(10), new new TextArea(20, 10). new new TextArea(200).
columns(20)).
TextArea(10, 20).
Which of the following creates a List with 5 visible items and multiple
41 new List(true, 5). new List(5, true). new List(5, false). new List(false,5).
selection enabled?
44 Which of the following components allow multiple selections? Combo box. Radio buttons. Choice. List.
45 Which method is method to set the layout of a container? startLayout( ). initLayout( ). layoutContainer( ). setLayout( ).
48 Which of the following may contain a menu bar? A panel. .A frame. An applet. A menu bar.