0% found this document useful (0 votes)
30 views2 pages

Sheet 3 Stud

Uploaded by

Rutuja
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)
30 views2 pages

Sheet 3 Stud

Uploaded by

Rutuja
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/ 2

Sr.

Question Answer 1 Answer 2 Answer 3 Answer 4

1 Which of the following method is used to


ImageIcon getIcon()
retrive icon of JButton ImageIcon getImageIcon() ImageIcon GetIcon() ImageIcon GetImageIcon()
2 class is used in encapsulate a mutually exclusive AbstractButton JRadioButton JButton ImageIcon
set of button
3 What is the minimum and maximum of minimum -10 Maximum - minimum -50 Maximum -100 minimum -0 Maximum -100 minimum -1 Maximum -100
JProgressBar 100
4 Which is correct constructor of JTable JTable(Object JTable(String data[][],String heads[]) JTable(String heads[],Object JTable(String heads[],String
data[][],String heads[]) data[][]) data[][])
5 Which is immediate super class for JButton JComponent JToggleButton Container Button
6 W hich is Control in sw ing a combination of a
text field and a dropdow n list Jlist JComboBox Choice None of these
7 If deafult constructor of JTabbedPane is used
then tabs are placed in top of ScrollPane

TRUE FALSE
8 JButton is created using constructor Jbutton(new
ImageIcon(“c:/a.jpg”))
Then how to set label for it

setActionCommand(String ch)
setCommand(String str) setActionCommand(char ch)
9 In swing CotentPane can be obtained by using
_____________
addContentPane() getContentPane() GetContentPane()
10 JApplet supports various panes like
glasspane,rootpane ,contentpane

True FALSE
11 JApplet class is derived from Jframe

Jpanel Jwindow Applet


12 What will be o/p of following program
import java.awt.*;
import javax.swing.*;
class test
{
public static void main(String arg[])
{
JFrame f=new JFrame("FD");
f.add(new JButton("OK"));
f.add(new JButton("Cancel"));
f.setDefaultCloseOperation(JFrame.EXIT_ON_C
LOSE);
f.setSize(200,200);
f.setVisible(true);
}
}

Both button OK and cancel


are displayed only button ok is displayed only button cancel is displayed
13 The method__________ gets the text of JLabel

retriveText() findText() text() getText()


14 Swing components that do not relay on native GUI
so they are called as

GUI Components Heavy weight component Light weight component


15 W hich class is used to represent a single line
textbox w ith passw ord character facility? Text Field JPasswordField Both A and B TextArea
16 setRollOverIcon(),setSelectedIcon() are of AbstractButton Jbutton JToggleButton
__________ class

17 Plugable Look & Feel is the feature of AWT Applet Swing Button
18 MutableTreeNode is
extends__________________interface TreeNode MutableTreeNode MutableNode All
19 In Sw ing the content pane can be obtained via
method________
for using Swing control one must getContaintPane() getContentPane() getGlassPane() getRootPane()
20 import______________________________pacak
ge java.applet java.awt javax.swing java.swing
21 Default orientation of progress bar is: Horizontal Vertical None of these
22 To add a component c to JPanel p ,use_______ p.add(c) p.getContentPane( c) p.append ( c) p.insert(c )
23 setToolTipText method is used for ________
components

Jlabel Jbutton Container JComponent


24 Which of following statements are false

JRadioButton inherits from All the methods of JRadioButton


javax.swing.AbstractButton You can set Icon for JRadioButton are also in Button None of these
25 If Jbutton is created as Jbutton(new
ImageIcon(“c:/a.jpg”))Then how to set label for it

default tab placement for JTabbedPane setCommand(String str) setActionCommand(char ch) setActionCommand(String ch)
26 is_________

JTabbedPane.TOP JTabbedPane.BOTTOM JTabbedPane.LEFT JTabbedPane.RIGHT


27 JToggleButton is two-states button that allows
user to switch on and off.

TRUE FALSE
28 What is the best to describe the relationship
between JComponent and JButton

The following specifies the advantage of It Association Inheritance Aggregation Composition


29 follows MVC (Model View Controller)
architecture Swing AWT Both A & B None of the above

You might also like