Unit 2 Swing
Unit 2 Swing
It
follows MVC (Model View Controller) architecture.
(a) Swing
(b) AWT
Answer: a
Q. 2 Swing is not a part of JFC (Java Foundation Classes) that is used to create GUI application?
Answer:b
Q.3 The Swing Component classes that are used in Encapsulates a mutually exclusive set of buttons?
(a) AbstractButton
(b) ButtonGroup
(c) JButton
(d) Imagelcon
Answer: b
Q. 4 The Java Foundation Classes (JF(c) is a set of GUI components which simplify the development of
desktop applications?
Answer: a
(a) Modelling-Visual-Controller
(b) Model-View-Controller
(c) Model-Viewable-Controller
(d) Many-View-Controller
Answer: b
a) SwingConstants interface
b) SwingConstants class
c) Swing class
d) Graphics dass
Answer: a
(a) AbstractButton
(b) JButton
(c) Button
(d) JRadioButton
Answer: a
(a) java.awt
(b) java.applet
(c) java.swing
(d) javax.swing
Answer: d
Q. 11 Which component is swing represents data in row and columns?
(a) JTextArea
(b) JTable
(c) JPanel
(d) JtabbedPane
Answer: b
(b) JTree(Vector v)
( c) JTree(int x)
Answer: c
(a) TreeNode
(d) Node
Answer: c
(c) java.awt.swing
(d) javax.swing
Answer: d
Answer: a
Answer: c
Q. 17. Which of the following method is not applicable for Button in swing.
Answer: c
( a) Icon geticon()
(b) Imageloon
Answer: c
a)setimage(Imagelcon
b) seticon Intagelcon i
c)setPicture(ImageIcon()
d) settimagelcon Imagelcon ()
Answer: b
Answer: b
Answer: d
c) Using JRadioButton
Answer: a
Answer: a
Q. 25. The scroll bar constants for scroll pane are defined in _ a) Scrollbar class ZEAL POLYTECKNIG
b) ScrollPane dass
c) ScrollPaneConstants interface
C)HORIZONTAL SCROLLBARS
D) HORIZONTAL ALWAYS
Answer: a
a) Not possible
Answer: b
import javax.swing.JFrame:
import javax.swing.JTree
import javax.swing.SwingUtilities: import
(JTree tree
root.add(vegetableNode):
root.add(fruitNode);
add(tree); }}
</applet>/
C)No error
d) Error in Frame
Answer: в
import java.awt.
import java.applet;
import javax.swing.
jc.additem"
a) Addljc),
b) Jc.add(c);
c)c.add(jc)
d) Add(c)
Answer: c
HORIZONTAL
Answer: c
a) TreePath
by TreeNode
d) Mutable TreeNode
Answer: b
interface
Q. 32, Which two parameters are required for JTree constructor to create a free?
Answer: b
d) It is not possible