0% found this document useful (0 votes)
38 views4 pages

AJPUT11

The document is a test paper for a computer engineering course covering topics related to Java GUI programming using AWT and Swing. It contains 25 multiple choice questions testing concepts such as layout managers, event handling, and GUI components. Some key topics assessed include the difference between AWT and Swing, common events like mouse and window events, adding/removing components from containers, and using layout managers like BorderLayout.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views4 pages

AJPUT11

The document is a test paper for a computer engineering course covering topics related to Java GUI programming using AWT and Swing. It contains 25 multiple choice questions testing concepts such as layout managers, event handling, and GUI components. Some key topics assessed include the difference between AWT and Swing, common events like mouse and window events, adding/removing components from containers, and using layout managers like BorderLayout.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Samarth Rural Educational Institute

SAMARTH POLYTECHNIC BELHE


Approved by AICTE, New Delhi & Govt. of Maharashtra, Affiliated to MSBTE, Mumbai & MSBTE Institute Code-0992, DTE Code No. D6451
Department Of Computer Engineering
NBA Accredited
Programme Name: Computer Engineering Programme Code: CO
Course Name: AJP Course Code: 22517
Marks: 20 AY:2023-24 Time:1 hour
Unit Test:1 Sem:V
Instructions:
a) All questions are compulsory
b) Illustrate your answers with neat sketches wherever necessary
c) Figures to the right indicate full marks
d) Assume suitable data if necessary
e) Preferably, write the answers in sequential order
Sr Blooms
no Questions Marks CO Level
1 Which package provides AWT classes in Java? 1 CO1 BT1
a. java.awt
b. java.swing
c. java.io
d. java.net

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

4 Which of the following is not a component in AWT? 1 CO1 BT2


a. Button
b. Checkbox
c. Table
d. TextArea

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

7 Which method is used to add a component to a container in AWT? 1 CO1 BT1


a. add()
b. setComponent()
c. addComponent()
d. setLayout()

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

10 What is a listener in context to event handling? 1 CO3 BT1


a. A listener is a variable that is notified when an event occurs
b. A listener is a object that is notified when an event occurs
c. A listener is a method that is notified when an event occurs
d. None of the mentioned

11 How many layout managers defined in java.awt package? 1 CO1 BT2


a. 2
b. 3
c. 5
d. 4

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

14 What is Swing in Java? 1 CO2 BT3


a. A programming language
b. A type of dance
c. A graphical user interface (GUI) toolkit
d. A data structure

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

18 Which of the following components can display images? 1 CO2 BT1


a. JTextArea
b. JTable
c. JList
d. JLabel

These two ways are used to create a Frame


By creating the object of Frame class (association)
19 By extending Frame class (inheritance) 1 CO1 BT2
a. True
b. False

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()

You might also like