You are on page 1of 4

AJP MCQ Question on 1st Unit

1) Which of the following is immediate parent class of Frame class ?


a) Panel
b) Window
c) Dialog
d) Container

2) Which method is use to add AWT controls on applet window ?


a) setControls()
b) addControls()
c) add()
e) insert()

3) Which method is use to get state of checkbox ?


a) get()
b) getCheckBoxState()
c) getState()
d) getCheckBox()

4) AWT stand for ?


a) Abstract Windows Toolkit
b) Abstract Window Tool
c) Abstraction Window Toolkit
d) Abstract Window Toolkit

5) Which of the following is true about Layout manager ?


a) Layout manager is interface which arrange controls on screen using customs value
b) Layout manager is interface which automatically arrange controls on screen
c) Layout manager is container which automatically arrange controls on screen
d) Layout manager is container which arrange controls with the help of layout

6) Which of the following is true ?


a) Between each component there is some default margin
b) Between each contrainer there is some padding left
c) Between each component there is thin border
d) Between each component there is come space left

7) Which of the following values describe position, width and height of GridBagLayout ?
a) gridx, gridy, Gridwidth and gridheight
b) x, y, Gridwidth and gridheight
c) gridBagx, gridBagy, Gridwidth and gridheight
d) x, y, width and height

8) GridBagLayout manager places the components in rows and columns allowing the components to occupy
multiple row and columns. This is called ………?
a) grid container area
b) display container
c) grid constraints
d) display area
JAYESH PATIL - jp7470484@gmail.com 1
9) What is purpose Constant value LOAD used by FileDialog ?
a) To indicate that purpose of the file dialog window is to locate a file from which to read
b) To indicate that purpose of the file dialog window is to load a file from which to read
c) To indicate that purpose of the file dialog window is to locate a file to which to save
d) To indicate that purpose of the file dialog window is to locate a file to which to write

10) If we set modality of dialog box false then what will happen ?
a) A Dialog box does not block any other window while it is visible.
b) A Dialog box does block any other window while it is visible.
c) A Dialog box does not block only their frame window while it is visible.
d) A Dialog box does block only their frame window while it is visible.

AJP MCQ Question on 2nd Unit


11) Which of the following is immediate parent class of JCheckBox class ?
a) JLabel
b) JToggleButton
c) JRadioButton
d) JButton

12) JApplet class extends Applet class ?


a) False
b) True
c) it depends
d) may be

13) In which package Graphics class is present ?


a) Applet
b) JApplet
c) Awt
d) swing

14) CheckBox is also implementation of which class ?


a) AbstractButton
b) JButton
c) RadioButton
d) JAbstractButton

15) Which of the following class is used to create node of tree ?


a) DefaultTreeNode
b) DefaultTreeMutableNode
c) DefaultMutableTreeNode
d) DefaultsMutableTreeNode

JAYESH PATIL - jp7470484@gmail.com 2


16) Why void setStringPainted(Boolean status) method used ?
a) It is used to set string value on progress bar
b) It is used to set color on progress bar
c) It is used to determine value of the string should be displayed
d) None of the above

17) It is mendatory to create method with name fillbar() to display proceeding of value in progress bar ?
a) Yes
b) It depends
c) No
d) None of the above

18) For button which component of mvc architecture hold information about state of button such as whether the
button is pushed or not ?
a) View
b) Controller
c) Model
d) Controller and model

19) Which of the following is true ?


a) The AWT component are considered to be heavyweight while Swing component are considered lightweights
b) The AWT component are considered to be lightweights while Swing component are considered heavyweight
c) The AWT and Swing component both are considered to be lightweights
d) The AWT and Swing component both are considered to be heavyweight

20) What is use of getContentPane() method ?


a) It use retrieves the content of container so that you can add an object to it
b) It use retrieves the container layer so that you can add an object to it
c) It use retrieves the content pane layer so that you can add an object to it.
d) All of the above

JAYESH PATIL - jp7470484@gmail.com 3


Answer MCQ Question on 1nd Unit

1) b
2) c
3) c
4) d
5) b
6) d
7) a
8) d
9) a
10) a

Answer MCQ Question on 2nd Unit


11) b
12) b
13) c
14) a
15) c
16) c
17) c
18) c
19) a
20) c

JAYESH PATIL - jp7470484@gmail.com 4

You might also like