AJPUT11
AJPUT11
2 Which of the following architecture does the Swing framework use? 1 CO2 BT2
a. MVC
b. MVP
c. Layered architecture
d. Master-Slave architecture
3 What is an event in delegation event model used by Java programming language? 1 CO3 BT1
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 events
5 Which of these methods are used to register a mouse motion listener? 1 CO3 BT2
a. addMouse()
b. addMouseListener()
c. addMouseMotionListner()
d. eventMouseMotionListener()
6 A ____ control is a dialogue window that allows the user to pick a file? 1 CO2 BT2
a. JChoosFile
b. JFilefield
c. JFile
d. JFileChooser
8 Which method is used to remove a component from a container in AWT? 1 CO1 BT2
a. remove()
b. deleteComponent()
c. removeComponent()
d. destroy()
9 ____ are classes that act as a connection point between event listeners and event sources? 1 CO3 BT2
a. Event adapters
b. Events Handler
c. Event listener
d. Jevent
13 Which method used to place some text in the text field? 1 CO1 BT2
A. getText(String str)
B. setText(String str)
C. putText(String str)
D. None of the above
15 Which of these events will be notified if scroll bar is manipulated? 1 CO3 BT2
a. ActionEvent
b. ComponentEvent
c. AdjustmentEvent
d. WindowEvent
Which is the container that doesn't contain title bar and MenuBars but it can have other
16 components like button, textfield etc? 1 CO1 BT2
a. Window
b. Frame
c. Panel
d. Container
17 Which of these events will be generated if we close an applet's window? 1 CO3 BT2
a. ActionEvent
b. ComponentEvent
c. AdjustmentEvent
d. WindowEvent
Which layout manager places components in one of five regions: north, south, east, west, and
20 center? 1 CO3 BT2
a. CardLayout
b. FlowLayout
c. BorderLayout
d. GridLayout
21 What is the purpose of the repaint() method in Java Swing? 1 CO2 BT1
a. To change the background color of a component
b. To add a new component to a container
c. To revalidate the layout of a container
d. To redraw a component on the screen
22 Which of these functions is called to display the output of an applet? 1 CO1 BT1
a) display()
b) paint()
c) displayApplet()
d) PrintApplet()
23 Which class is used to display a list of selectable items in Java Swing? 1 CO2 BT1
a. JTextField
b. JTextArea
c. JLabel
d. JList
24 Which of these events is generated when the component is added or removed? 1 CO3 BT1
a. ComponentEvent
b. ContainerEvent
c. FocusEvent
d. InputEvent
25 Which of the following methods is used to create a new JMenuBar object? 1 CO2 BT3
a. new JMenuBar()
b. createMenuBar()
c. makeMenuBar()
d. getMenuBar()