Chapter 3 MCQ 3 Ajp
Chapter 3 MCQ 3 Ajp
Student Name : KAPADIA KUSH AMIT Roll No. : 20203A0055 Enrollment No.
: 2005680051
a) b)
1 d b 0
Panel Applet
c) d)
Component Event
a) setVisible(false) b) windowClosing()
2 c) d) d d 1
b)
a) TEXT_CHANGED
TEXT_FORMAT_CHANGED
3 c c 1
c) TEXT_VALUE_CHANGED
d) TEXT_SIZE_CHANGED
a) b)
4 a a 1
adapter classes Event
c) d)
EventObject Listener
https://mycollege.vpt.edu.in/student/end_practice_exam_new.php 1/7
10/12/22, 8:55 PM Vidyalankar Polytechnic | VP
5 a) addMouse() b) addMouseListener() d d 1
d)
c) addMouseMotionListner()
eventMouseMotionListener()
6 a) java.io b) java.lang d d 1
d)
c) java.net
java.util
7 c c 1
a) Exception Handling b) String Handling
d)
c) Event Handling
None of the above
a) ActionEvent
8 b) ComponentEvent d d 1
c) d)
AdjustmentEvent WindowEvent
b)
9 a) KeyEvent ListEvent c c 1
c)
d) MouseEvent
ItemEvent
https://mycollege.vpt.edu.in/student/end_practice_exam_new.php 2/7
10/12/22, 8:55 PM Vidyalankar Polytechnic | VP
a) b)
c) d)
a) b)
11 c c 1
getParent() getComponent()
c) d)
getChild() geoReferenced()
https://mycollege.vpt.edu.in/student/end_practice_exam_new.php 3/7
10/12/22, 8:55 PM Vidyalankar Polytechnic | VP
a) b)
12 a a 1
Button Label
c) d)
CheckBox Window
b)
a)
A listener is a variable that is A listener is a object that is
notified when an event occurs. notified when an event occurs.
13 c b 0
c)
d)
A listener is a method that is
notified when an event occurs. None of the mentioned
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
Container c=getContentPane();
c.setLayout(new FlowLayout());
b1.addActionListener(this);
c.add(b1);
https://mycollege.vpt.edu.in/student/end_practice_exam_new.php 4/7
10/12/22, 8:55 PM Vidyalankar Polytechnic | VP
b2.addActionListener(this);
c.add(b2);
b3.addActionListener(this);
c.add(b3);
bg.add(b1);
bg.add(b2);
bg.add(b3);
String str;
str=e.getActionCommand();
if(str=="red")
c.setBackground(Color.red);
else if(str=="blue")
c.setBackground(Color.blue);
else if(str=="green")
c.setBackground(Color.green);
/**/
https://mycollege.vpt.edu.in/student/end_practice_exam_new.php 5/7
10/12/22, 8:55 PM Vidyalankar Polytechnic | VP
b) ActionListener
a) ItemListener
d)
c) MouseListener
WindowListener
b)
15 b b 1
a) Not Changed
Changed
c) d)
b)
16 a a 1
a) windowIconfified()
windowClosed()
c) d)
windowDeactivated() windowOpened()
a) event
17 b) Source a a 1
c) d)
18 b b 1
a) windowActivated b) windowReactivated
d)
c) windowDeiconified
windowClosed()
https://mycollege.vpt.edu.in/student/end_practice_exam_new.php 6/7
10/12/22, 8:55 PM Vidyalankar Polytechnic | VP
a) b)
19 class a separate piece of code d b 0
c) d)
Interface Listener
Total Marks : 20
Obtained : 17
https://mycollege.vpt.edu.in/student/end_practice_exam_new.php 7/7