Awt Questions 2
Awt Questions 2
2) Implement the Listener interface and overrides its methods is required to perform in event
handling.
a. True b. False
3) Which is the container that doesn't contain title bar and MenuBars but it can have other
components like button, textfield etc?
a. Window b. Frame c. Panel d. Container
7) The Java Foundation Classes (JFC) is a set of GUI components which simplify the
development of desktop applications.
a. True b. False
8) Which object can be constructed to show any number of choices in the visible window?
a. Labels b. Choice c. List d. Checkbox
11) Which is a component in AWT that can contain another components like buttons,
textfields, labels etc.?
a. Window
b. Container
c. Panel
d. Frame
14) The ActionListener interface is not used for handling action events.
a. True b. False
15) Which package provides many event classes and Listener interfaces for event handling?
a. java.awt
b. java.awt.Graphics
c. java.awt.event
d. None of the above
a. Exception Handling
b. String Handling
c. Event Handling
d. None of the above
a. Same class
b. Other class
c. Anonymous class
d. All mentioned above
Above Yash Jewelers, In front of Pramod Super Market,
MOB- +917276535329
Ausa Road, Latur
18) Which class provides many methods for graphics programming?
a. java.awt b. java.Graphics
c. java.awt.Graphics d. None of the above
a. True
b. False
20) Name the class used to represent a GUI application window, which is optionally resizable
and can have a title bar, an icon, and menus.
a) Window
b) Panel
c) Dialog
d) Frame
21) Which class can be used to represent a checkbox with a textual label that can appear in a
menu.
a) MenuBar
b) MenuItem
c) CheckboxMenuItem
d) Menu
24) Which of the following methods can be used to remove a java.awt.Component object from
the display?
a) delete()
b) remove()
c) hide()
d) disappear()
e) move()
25) The setBackground() method is part of the following class in java.awt package:
a) Graphics
b) Applet
c) Container
d) Object
e) Component
26) What is an event in delegation event model used by Java programming language?
a) An event is an object that describes a state change in a source
b) An event is an object that describes a state change in processing
c) An event is an object that describes any change by the user and system
d) An event is a class used for defining object, to create event
28) Which of these methods are used to register a mouse motion listener?
a) addMouse()
b) addMouseListener()
c) addMouseMotionListner()
d) eventMouseMotionListener()
31) Which of these methods can be used to determine the type of event?
a) getID() b) getSource()
c) getEvent() d) getEventObject()
35) Which of these interfaces handles the event when a component is added to a container?
a) ComponentListener
b) ContainerListener
c) FocusListener
d) InputListener