0% found this document useful (0 votes)
0 views

Chapter 1 MCQ 3

The document presents the online exam results for a student named Kapadia Kush Amit, who took an exam on the Abstract Windowing Toolkit (AWT). The exam consists of multiple-choice questions with the student's answers and correct answers indicated, resulting in a total score of 15 out of 20. The document includes details such as the exam title, student roll number, and enrollment number.

Uploaded by

nebuladreamerx
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)
0 views

Chapter 1 MCQ 3

The document presents the online exam results for a student named Kapadia Kush Amit, who took an exam on the Abstract Windowing Toolkit (AWT). The exam consists of multiple-choice questions with the student's answers and correct answers indicated, resulting in a total score of 15 out of 20. The document includes details such as the exam title, student roll number, and enrollment number.

Uploaded by

nebuladreamerx
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/ 7

10/12/22, 7:29 PM Vidyalankar Polytechnic | VP

Online Exam Result

Exam : AJP - Chapter 1 - Abstract Windowing Toolkit (AWT) Class : CO5I Div : A

Student Name : KAPADIA KUSH AMIT Roll No. : 20203A0055 Enrollment No.
: 2005680051

Sr. Your Correct


Question Marks
No Answer Answer

To set the alignment of the string within the label by calling ___
method ,to obtain the current alignment ___ method is used.

a)
b)

1 getAlignment( ) ,setAlignment( ) setAlign( ) ,getAlign( ) c c 1

c)

setAlignment( ) ,getAlignment( ) d)
getAlign( ) ,setAlign( )

Event handling in checkbox is done by __ listener and __ object is


used.

b)
a)
MouseListener , MouseEvent
2 ItemListener , ItemEvent a a 1

c)
d)
ActionListener , ActionEvent
KeyListener , KeyEvent

https://mycollege.vpt.edu.in/student/end_practice_exam_new.php 1/7
10/12/22, 7:29 PM Vidyalankar Polytechnic | VP

Sr. Your Correct


Question Marks
No Answer Answer

Which packages will use for the following code:

/*

<applet code="LabelDemo" width=300 height=200>

</applet>

*/

public class LabelDemo extends Applet {

public void init() {

Label one = new Label("One");

Label two = new Label("Two");

Label three = new Label("Three");

// add labels to applet window

add(one);

add(two);
3 a a 1
add(three);

a)
b)
import java.awt.*; import
java.applet.*; import javax.swing.*; import
java.awt.*;

c)
d)
import javax.swing.*; import
java.applet.*; import java.applet.*; import
java.awt.event.*;

https://mycollege.vpt.edu.in/student/end_practice_exam_new.php 2/7
10/12/22, 7:29 PM Vidyalankar Polytechnic | VP

Sr. Your Correct


Question Marks
No Answer Answer

The general form to set a specific type of layout manager is

a) b)

void setLayout(LayoutManager Void setLayout(LayoutManager


4 a a 1
lm) lm)

c) d)

void setLayout(layoutManager Void setLayout(Layoutmanager


lm) lm)

In which of the following the checkbox will be set.

a)
b)
Checkbox Win98 = new
Checkbox("Windows 98/XP", Checkbox Win98 = new
cbg, true); Checkbox("Windows 98/XP",
5 cbg, false); a b 0

c)
d)
Checkbox Win98 = new
Checkbox("Windows 98/XP", Checkbox Win98 = new
true); Checkbox("Windows 98/XP",
true);

__________ is an abstract class that encapsulates all of the


attributes of a visual component.

a) b)

6 Component Window b a 0

c) d)

Frame Panel

https://mycollege.vpt.edu.in/student/end_practice_exam_new.php 3/7
10/12/22, 7:29 PM Vidyalankar Polytechnic | VP

Sr. Your Correct


Question Marks
No Answer Answer

To set a checkbox which method is used-

a) b)

setselectedCheckbox( ) setSelectedCheckbox( )
7 b b 1

c)
d)
getselectedCheckbox( )
getSelectedCheckbox( )

To retrieve the current state of a check box, call __ method , to set


its state, call __ method.

a) b)

8 setState( ) , getState( ) getState( ) , setState( ) b b 1

c)
d)
setstate( ) , getstate( )
getstate( ) , setstate( )

Arranges the componemnts into grid

a) b)
9 c c 1
BorderLayout CardLayout

c) d)

GridLayout FlowLayout

https://mycollege.vpt.edu.in/student/end_practice_exam_new.php 4/7
10/12/22, 7:29 PM Vidyalankar Polytechnic | VP

Sr. Your Correct


Question Marks
No Answer Answer

Which class dispatches events to multiple listener

a) b)
10 b b 1
AWTEvent AWTEventMulticaster

c) d)

AWTEventManager All of the Above

Arranges the components horizontally

a) b)
11 b d 0
BorderLayout CardLayout

c) d)

GridLayout FlowLayout

Which of these events will be generated if we close the applet?


a) b)

ActionListener ItemListener
12 a d 0
c) d)

MouseListener WindowListener

To implement the windowClosing() method which interface is


used?
b)
a) ActionListener
13 ItemListener c c 1
c) d)

WindowListener None

A push button is an active control that has a _____________


appearance

a) b)
14 c c 1
One dimensional Two dimensional

c) d)

Three dimensional None of these

https://mycollege.vpt.edu.in/student/end_practice_exam_new.php 5/7
10/12/22, 7:29 PM Vidyalankar Polytechnic | VP

Sr. Your Correct


Question Marks
No Answer Answer

Set label of a button by calling __ method and can retrieve its


label by calling __ method.

a) b)
15 b b 1
getLabel( ) , setLabel( ) setLabel( ) , getLabel( )

c)
d)
getlabel( ) , setlabel( )
setlabel( ) , getlabel( )

The ______ class is a concrete subclass of Container.

a) b)
16 c c 1
Container Window

c) d)

Panel None

Which class is a subclass of Component?


b)
a) Container
Window
17 a a 1
c) d)

Frame none

The two types of menus which are given as follows:

a) b)
18 c c 1
Pop-up menus Regular menus

c) d)

Both a & b None of these

https://mycollege.vpt.edu.in/student/end_practice_exam_new.php 6/7
10/12/22, 7:29 PM Vidyalankar Polytechnic | VP

Sr. Your Correct


Question Marks
No Answer Answer
Panel is a superclass for _____.
a) b)

Window Frame
19 d c 0
c) d)

Applet None

To set or change the text in a label __ method and to obtain the


current label by calling ___ method is used.

a) b)
20 c c 1
setTxt() , getTxt() settext() , gettext()

c)
d)
setText() , getText()
getText() , setText()

Total Marks : 20

Obtained : 15

Student Signature _____________________________

https://mycollege.vpt.edu.in/student/end_practice_exam_new.php 7/7

You might also like