wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Java Swing

Total questions: 146

Worksheet time: 1hrs 13mins

Name
Class
Date
1.

is a part of Java Foundation Classes (JFC) that is used to create window-based applications. It is built on the top of AWT (Abstract Windowing Toolkit) API and entirely written in java,

a)

Java Swing

b)

Java Swang

c)

JMenu

d)

JCheckbox

2.

JFC

a)

Java Swing

b)

Java Foundation Classes

c)

JCheckbox

d)

JTextArea

3.

AWT

a)

Java Swing

b)

Java Foundation Classes

c)

Abstract Windowing Toolkit

d)

JTextArea

4.

provides platform-independent and lightweight components

a)

JButton

b)

Java Foundation Classes

c)

Abstract Windowing Toolkit

d)

Java Swing

5.

provide classes for java swing API such as JButton, JTextField, JTextArea, JRadioButton, JCheckbox, JMenu, JColorChooser etc.

a)

javax.swing package

b)

Java Foundation Classes

c)

Abstract Windowing Toolkit

d)

Java Swing

6.

components are platform-dependent

a)

Abstract Windowing Toolkit (AWT)

b)

Java Swing

7.

components are platform-independent

a)

Abstract Windowing Toolkit (AWT)

b)

Java Swing

8.

components are heavyweight

a)

Abstract Windowing Toolkit (AWT)

b)

Java Swing

9.

components are lightweight

a)

Abstract Windowing Toolkit (AWT)

b)

Java Swing

10.

doesn't support pluggable look and feel

a)

Abstract Windowing Toolkit (AWT)

b)

Java Swing

11.

supports pluggable look and feel

a)

Abstract Windowing Toolkit (AWT)

b)

Java Swing

12.

provides less components than Swing

a)

Abstract Windowing Toolkit (AWT)

b)

Java Swing

13.

provides more powerful components such as tables, lists, scrollpanes, colorchooser, tabbedpane, etc.

a)

Abstract Windowing Toolkit (AWT)

b)

Java Swing

14.

doesn't follows MVC (Model View Controller) where model represents data, view represents presentation and controller acts as an interface between model and view.

a)

Abstract Windowing Toolkit (AWT)

b)

Java Swing

15.

follows MVC

a)

Abstract Windowing Toolkit (AWT)

b)

Java Swing

16.

MVC

a)

Abstract Windowing Toolkit (AWT)

b)

Model View Controller

17.

Commonly used Methods of Component class

  • -add a component on another component

a)

public void setVisible(boolean b)

b)

public void setLayout(LayoutManager m)

c)

public void add(Component c)

d)

public void setSize(int width, int height)

18.

Commonly used Methods of Component class

  • -sets size of the component

a)

public void setVisible(boolean b)

b)

public void setLayout(LayoutManager m)

c)

public void add(Component c)

d)

public void setSize(int width, int height)

19.

Commonly used Methods of Component class

  • -sets the layout manager for the component.

a)

public void setVisible(boolean b)

b)

public void setLayout(LayoutManager m)

c)

public void add(Component c)

d)

public void setSize(int width, int height)

20.

Commonly used Methods of Component class

  • -sets the visibility of the component. It is by default false.

a)

public void setVisible(boolean b)

b)

public void setLayout(LayoutManager m)

c)

public void add(Component c)

d)

public void setSize(int width, int height)

21.

public class JButton extends AbstractButton implements Access ible

a)

public void setVisible(boolean b)

b)

Java JButton

c)

public void add(Component c)

d)

public void setSize(int width, int height)

22.

Commonly used Constructors of JButton

-it creates a button with no text and icon

a)

public void setVisible(boolean b)

b)

Java JButton

c)

JButton()

d)

public void setSize(int width, int height)

23.

Commonly used Constructors of JButton

-it creates a button with the specified text

a)

public void setVisible(boolean b)

b)

Java JButton

c)

JButton()

d)

JButton(String s)

24.

Commonly used Constructors of JButton

-it creates a button with the specified icon object

a)

JButton(Icon i)

b)

Java JButton

c)

JButton()

d)

JButton(String s)

25.

Commonly used Methods of AbstractButton class

-it is used to set specified text on button

a)

JButton(Icon i)

b)

void setText(String s)

c)

JButton()

d)

JButton(String s)

26.

Commonly used Methods of AbstractButton class

-it is used to return the text of the button

a)

JButton(Icon i)

b)

void setText(String s)

c)

String getText()

d)

JButton(String s)

27.

Commonly used Methods of AbstractButton class

-it is used to enable or disable the button

a)

JButton(Icon i)

b)

void setText(String s)

c)

String getText()

d)

void setEnabled(boolean b)

28.

Commonly used Methods of AbstractButton class

-it is used to set the specified icon on the button

a)

void setIcon(Icon b)

b)

void setText(String s)

c)

String getText()

d)

void setEnabled(boolean b)

29.

Commonly used Methods of AbstractButton class

-it is used to get the icon of the button

a)

void setIcon(Icon b)

b)

Icon getIcon()

c)

String getText()

d)

void setEnabled(boolean b)

30.

Commonly used Methods of AbstractButton class

-it is used to set the mnemonic on the button.

a)

void setIcon(Icon b)

b)

Icon getIcon()

c)

void setMnemonic(int a)

d)

void setEnabled(boolean b)

31.

Commonly used Methods of AbstractButton class

-it is used to add the action listener to this object

a)

void setIcon(Icon b)

b)

Icon getIcon()

c)

void setMnemonic(int a)

d)

void addActionListener(ActionListener a)

32.

is a text component specialized for password entry. It allows editing of a single line of text. It inherits JTextField class.

a)

Java JPasswordField

b)

Icon getIcon()

c)

void setMnemonic(int a)

d)

void addActionListener(ActionListener a)

33.

public class JPasswordField extends JTextField

a)

Java JPasswordField

b)

JPasswordField class declaration

c)

void setMnemonic(int a)

d)

void addActionListener(ActionListener a)

34.

Commonly used Constructors JPasswordField

  • - construct a new JPasswordField, with a default document, null starting text string, and 0 column width

a)

Java JPasswordField

b)

JPasswordField class declaration

c)

JPasswordField()

d)

void addActionListener(ActionListener a)

35.

Commonly used Constructors JPasswordField

  • - constructs a new empty JPasswordField with the specified number of columns

a)

Java JPasswordField

b)

JPasswordField class declaration

c)

JPasswordField()

d)

JPasswordField(int columns)

36.

Commonly used Constructors JPasswordField

  • - constructs a new JPasswordField initialized with the specified text.

a)

JPasswordField(String text)

b)

JPasswordField class declaration

c)

JPasswordField()

d)

JPasswordField(int columns)

37.

Commonly used Constructors JPasswordField

  • - constructs a new JPasswordField initialized with the specified text and columns.

a)

JPasswordField(String text)

b)

JPasswordField(String text, int columns)

c)

JPasswordField()

d)

JPasswordField(int columns)

38.

Commonly used Constructors of JLabel

  • - creates a JLabel instance with no image and with an empty string for the title

a)

JPasswordField(String text)

b)

JPasswordField(String text, int columns)

c)

JLabel()

d)

JPasswordField(int columns)

39.

Commonly used Constructors of JLabel

  • - creates a JLabel instance with the specified text.

a)

JPasswordField(String text)

b)

JPasswordField(String text, int columns)

c)

JLabel()

d)

JLabel(String s)

40.

Commonly used Constructors of JLabel

  • - creates a JLabel instance with the specified image.

a)

JLabel(Icon i)

b)

JPasswordField(String text, int columns)

c)

JLabel()

d)

JLabel(String s)

41.

Commonly used Constructors of JLabel

  • - creates a JLabel instance with the specified text, image, and horizontal alignment.

a)

JLabel(Icon i)

b)

JLabel(String s, Icon i, int horizontalAlignment)

c)

JLabel()

d)

JLabel(String s)

42.

Commonly used Constructors of JTextField

  • - creates a new textField

a)

JLabel(Icon i)

b)

JLabel(String s, Icon i, int horizontalAlignment)

c)

JTextField()

d)

JLabel(String s)

43.

Commonly used Constructors of JTextField

  • - creates a new TextField initialized with the specified text

a)

JLabel(Icon i)

b)

JLabel(String s, Icon i, int horizontalAlignment)

c)

JTextField()

d)

JTextField(String text)

44.

Commonly used Constructors of JTextField

  • - creates a new TextField initialized with the specified text and columns

a)

JTextField(String text, int columns)

b)

JLabel(String s, Icon i, int horizontalAlignment)

c)

JTextField()

d)

JTextField(String text)

45.

Commonly used Constructors of JTextField

  • - creates a new empty TextField with the specified number of columns

a)

JTextField(String text, int columns)

b)

JTextField(int columns)

c)

JTextField()

d)

JTextField(String text)

46.

Commonly used Constructors of JTextArea

  • - creates a text area that displays no text initially.

a)

JTextField(String text, int columns)

b)

JTextField(int columns)

c)

JTextArea()

d)

JTextField(String text)

47.

Commonly used Constructors of JTextArea

  • - creates a text area that displays specified text initially.

a)

JTextField(String text, int columns)

b)

JTextField(int columns)

c)

JTextArea()

d)

JTextArea(String s)

48.

Commonly used Constructors of JTextArea

  • - creates a text area with specified number of rows and columns that displays no text initially

a)

JTextArea(int row, int column)

b)

JTextField(int columns)

c)

JTextArea()

d)

JTextArea(String s)

49.

Commonly used Constructors of JTextArea

  • - creates a text area with specified number of rows and columns that displays speciifed text.

a)

JTextArea(int row, int column)

b)

JTextArea(String s, int row, int column)

c)

JTextArea()

d)

JTextArea(String s)

50.

Commonly used Constructors of JCheckBox

  • - creates an initially unselected check box button with no text, no icon

a)

JTextArea(int row, int column)

b)

JTextArea(String s, int row, int column)

c)

JJCheckBox()

d)

JTextArea(String s)

51.

Commonly used Constructors of JCheckBox

  • - creates an initially unselected check box button with text

a)

JTextArea(int row, int column)

b)

JTextArea(String s, int row, int column)

c)

JJCheckBox()

d)

JCheckBox(String s)

52.

Commonly used Constructors of JCheckBox

  • - creates a check box with text and specifies whether or not it is initially selected

a)

JCheckBox(String text, boolean selected)

b)

JTextArea(String s, int row, int column)

c)

JJCheckBox()

d)

JCheckBox(String s)

53.

Commonly used Constructors of JCheckBox

  • - creates a check box where properties are taken from the Action supplied.

a)

JCheckBox(String text, boolean selected)

b)

JCheckBox(Action a)

c)

JJCheckBox()

d)

JCheckBox(String s)

54.

Commonly used Constructors of JRadioButton

  • - creates an unselected radio button with no text

a)

JCheckBox(String text, boolean selected)

b)

JCheckBox(Action a)

c)

JRadioButton()

d)

JCheckBox(String s)

55.

Commonly used Constructors of JRadioButton

  • - creates an unselected radio button with specified text

a)

JCheckBox(String text, boolean selected)

b)

JCheckBox(Action a)

c)

JRadioButton()

d)

JRadioButton(String s)

56.

Commonly used Constructors of JRadioButton

  • - creates a radio button with the specified text and selected status

a)

JRadioButton(String s, boolean selected)

b)

JCheckBox(Action a)

c)

JRadioButton()

d)

JRadioButton(String s)

57.

Commonly used Constructors of JComboBox

  • - creates a JComboBox with a default data model.

a)

JRadioButton(String s, boolean selected)

b)

JComboBox()

c)

JRadioButton()

d)

JRadioButton(String s)

58.

Commonly used Constructors of JComboBox

  • - creates a JComboBox that contains the elements in the specified array

a)

JRadioButton(String s, boolean selected)

b)

JComboBox()

c)

JComboBox(Object[] items)

d)

JRadioButton(String s)

59.

Commonly used Constructors of JComboBox

  • - creates a JComboBox that contains the elements in the specified vector

a)

JRadioButton(String s, boolean selected)

b)

JComboBox()

c)

JComboBox(Object[] items)

d)

JComboBox(Vector<?> items)

60.

Commonly used Constructors of JTable

  • - creates a table with empty cells.

a)

JTable()

b)

JComboBox()

c)

JComboBox(Object[] items)

d)

JComboBox(Vector<?> items)

61.

Commonly used Constructors of JTable

  • - creates a table with the specified data.

a)

JTable()

b)

JTable(Object[][] rows, Object[] columns)

c)

JComboBox(Object[] items)

d)

JComboBox(Vector<?> items)

62.

Commonly used Constructors of JList

  • - creates a JList with an empty, read-only, model

a)

JTable()

b)

JTable(Object[][] rows, Object[] columns)

c)

JList()

d)

JComboBox(Vector<?> items)

63.

Commonly used Constructors of JList

  • - creates a JList that displays the elements in the specified array

a)

JTable()

b)

JTable(Object[][] rows, Object[] columns)

c)

JList()

d)

JList(ary[] listData)

64.

Commonly used Constructors of JList

  • - creates a JList that displays the elements from the specified, non-null, model

a)

JList(ListModel<ary> dataModel)

b)

JTable(Object[][] rows, Object[] columns)

c)

JList()

d)

JList(ary[] listData)

65.

Commonly used Constructors of JPanel

  • - it is used to create a new JPanel with a double buffer and a flow layout

a)

JList(ListModel<ary> dataModel)

b)

JPanel()

c)

JList()

d)

JList(ary[] listData)

66.

Commonly used Constructors of JPanel

  • - it is used to create a new JPanel with FlowLayout and the specified buffering strategy

a)

JList(ListModel<ary> dataModel)

b)

JPanel()

c)

JPanel(boolean isDoubleBuffered)

d)

JList(ary[] listData)

67.

Commonly used Constructors of JPanel

  • - it is used to create a new JPanel with the specified layout manager

a)

JList(ListModel<ary> dataModel)

b)

JPanel()

c)

JPanel(boolean isDoubleBuffered)

d)

JPanel(LayoutManager layout

68.

Commonly used Constructors of JProgressBar

  • - it is used to create a horizontal progress bar but no string text

a)

JProgressBar()

b)

JPanel()

c)

JPanel(boolean isDoubleBuffered)

d)

JPanel(LayoutManager layout

69.

Commonly used Constructors of JProgressBar

  • - it is used to create a horizontal progress bar with specified minimum and maximum value

a)

JProgressBar()

b)

JProgressBar(int min, int max)

c)

JPanel(boolean isDoubleBuffered)

d)

JPanel(LayoutManager layout

70.

Commonly used Constructors of JProgressBar

  • - it is used to create a progress bar with the specified orientation, it can be either Vertical or Horizontal by using SwingConstants.HORIZONTAL constants.

a)

JProgressBar()

b)

JProgressBar(int min, int max)

c)

JProgressBar(int orient)

d)

JPanel(LayoutManager layout

71.

Commonly used Constructors of JProgressBar

  • - it is used to create a progress bar with the specified orientation, minimum and maximum value

a)

JProgressBar()

b)

JProgressBar(int min, int max)

c)

JProgressBar(int orient)

d)

JProgressBar(int orient, int min, int max)

72.

Commonly used Constructors of JSlider

  • - creates a slider witth the initial value of 50 and range of 0 to 100

a)

JSlider()

b)

JProgressBar(int min, int max)

c)

JProgressBar(int orient)

d)

JProgressBar(int orient, int min, int max)

73.

Commonly used Constructors of JSlider

  • - creates a slider with the specified orientation set by either JSlider HORIZONTAL or JSlider.VERTICAL with the range 0 to 100 and initial value 50

a)

JSlider()

b)

JSlider(int orientation

c)

JProgressBar(int orient)

d)

JProgressBar(int orient, int min, int max)

74.

Commonly used Constructors of JSlider

  • - creates a horizontal slider using the given min and max.

a)

JSlider()

b)

JSlider(int orientation

c)

JSlider(int min, int max)

d)

JProgressBar(int orient, int min, int max)

75.

Commonly used Constructors of JSlider

  • - creates a horizontal slider using the given min, max and value

a)

JSlider()

b)

JSlider(int orientation

c)

JSlider(int min, int max)

d)

JSlider(int min, int max, int value)

76.

Commonly used Constructors of JSlider

  • - creates a slider using the given orientation, min, max and value

a)

JSlider(int orientation, int min, int max, int value)

b)

JSlider(int orientation

c)

JSlider(int min, int max)

d)

JSlider(int min, int max, int value)

77.

Commonly used Methods of JLabel

  • - it returns the text string that a label displays

a)

JLabel(Icon i)

b)

JLabel(String s, Icon i, int horizontalAlignment)

c)

String getText()

d)

JLabel(String s)

78.

Commonly used Methods of JLabel

  • - it defines the single line of text this component will display

a)

JLabel(Icon i)

b)

JLabel(String s, Icon i, int horizontalAlignment)

c)

String getText()

d)

void setText(String text)

79.

Commonly used Methods of JLabel

  • - it sets the alignment of the label's contents along the X axis.

a)

void setHorizontalAlignment(int alignment)

b)

JLabel(String s, Icon i, int horizontalAlignment)

c)

String getText()

d)

void setText(String text)

80.

Commonly used Methods of JLabel

  • - it returns the graphic image that the label displays.

a)

void setHorizontalAlignment(int alignment)

b)

Icon getIcon()

c)

String getText()

d)

void setText(String text)

81.

Commonly used Methods of JLabel

  • - it returns the alignment of the label's contents along the X axis.

a)

void setHorizontalAlignment(int alignment)

b)

Icon getIcon()

c)

int getHorizontalAlignment()

d)

void setText(String text)

82.

Commonly used Methods of JTextField

  • - it is used to add the specified action listener to receive action events from this textfield.

a)

void setHorizontalAlignment(int alignment)

b)

Icon getIcon()

c)

int getHorizontalAlignment()

d)

void addActionListener(ActionListener l)

83.

Commonly used Methods of JTextField

  • - it returns the currently set Action for this ActionEvent source, or null if no Action is set.

a)

Action getAction()

b)

Icon getIcon()

c)

int getHorizontalAlignment()

d)

void addActionListener(ActionListener l)

84.

Commonly used Methods of JTextField

  • - it is used to set the current font.

a)

Action getAction()

b)

void setFont(Font f)

c)

int getHorizontalAlignment()

d)

void addActionListener(ActionListener l)

85.

Commonly used Methods of JTextField

  • - it is used to remove the specified action listener so that it no longer receives action events from this textfield.

a)

Action getAction()

b)

void setFont(Font f)

c)

void removeActionListener(ActionListener l)

d)

void addActionListener(ActionListener l)

86.

Commonly used Methods of JTextArea

  • - it is used to set specified number of rows

a)

Action getAction()

b)

void setFont(Font f)

c)

void removeActionListener(ActionListener l)

d)

void setRows(int rows)

87.

Commonly used Methods of JTextArea

  • - it is used to set specified number of column.

a)

void setColumns(int cols)

b)

void setFont(Font f)

c)

void removeActionListener(ActionListener l)

d)

void setRows(int rows)

88.

Commonly used Methods of JTextArea

  • - it is used to set the specified font.

a)

void setColumns(int cols)

b)

void setFont(Font f)

c)

void removeActionListener(ActionListener l)

d)

void setRows(int rows)

89.

Commonly used Methods of JTextArea

  • - it is used to insert the specified text on the specified position.

a)

void setColumns(int cols)

b)

void setFont(Font f)

c)

void insert(String s, int position)

d)

void setRows(int rows)

90.

Commonly used Methods of JTextArea

  • - it is used to append the given text to the end of the document.

a)

void setColumns(int cols)

b)

void setFont(Font f)

c)

void insert(String s, int position)

d)

void append(String s)

91.

Commonly used Methods of JCheckBox

  • - it is used to get the AccessibleContext associated with this JCheckBox

a)

AccessibleContext getAccessibleContext()

b)

void setFont(Font f)

c)

void insert(String s, int position)

d)

void append(String s)

92.

Commonly used Methods of JCheckBox

  • - it returns a string representation of this JCheckBox

a)

AccessibleContext getAccessibleContext()

b)

protected String paramString()

c)

void insert(String s, int position)

d)

void append(String s)

93.

Commonly used Methods of JRadioButton

  • - it is used to set specified text on button

a)

AccessibleContext getAccessibleContext()

b)

protected String paramString()

c)

void setText(String s)

d)

void append(String s)

94.

Commonly used Methods of JRadioButton

  • - it is used to return the text of the button

a)

AccessibleContext getAccessibleContext()

b)

protected String paramString()

c)

void setText(String s)

d)

String getText()

95.

Commonly used Methods of JRadioButton

  • - it is used to enable or disable the button

a)

void setEnabled(boolean b)

b)

protected String paramString()

c)

void setText(String s)

d)

String getText()

96.

Commonly used Methods of JRadioButton

  • - it is used to set the specified icon on the button

a)

void setEnabled(boolean b)

b)

void setIcon(Icon b)

c)

void setText(String s)

d)

String getText()

97.

Commonly used Methods of JRadioButton

  • - it is used to get the Icon of the button

a)

void setEnabled(boolean b)

b)

void setIcon(Icon b)

c)

Icon getIcon()

d)

String getText()

98.

Commonly used Methods of JRadioButton

  • - it is used to set the mnemonic on the button

a)

void setEnabled(boolean b)

b)

void setIcon(Icon b)

c)

Icon getIcon()

d)

void setMnemonic(int a )

99.

Commonly used Methods of JRadioButton

  • - it is used to add the action listener to this object.

a)

void addActionListener(ActionListener a)

b)

void setIcon(Icon b)

c)

Icon getIcon()

d)

void setMnemonic(int a )

100.

Commonly used Methods of JComboBox

  • - it is used to add an item to the item list.

a)

void addActionListener(ActionListener a)

b)

void addItem(Object anObject)

c)

Icon getIcon()

d)

void setMnemonic(int a )

101.

Commonly used Methods of JComboBox

  • - it is used to delete an item to the item list.

a)

void addActionListener(ActionListener a)

b)

void addItem(Object anObject)

c)

void removeItem(Object anObject)

d)

void setMnemonic(int a )

102.

Commonly used Methods of JComboBox

  • - it is used to remove all the items from the list.

a)

void addActionListener(ActionListener a)

b)

void addItem(Object anObject)

c)

void removeItem(Object anObject)

d)

void removeAllItems()

103.

Commonly used Methods of JComboBox

  • - it is used to determine whether the JComboBox is editable.

a)

void setEditable(boolean b)

b)

void addItem(Object anObject)

c)

void removeItem(Object anObject)

d)

void removeAllItems()

104.

Commonly used Methods of JComboBox

  • - it is used to add the ActionListener.

a)

void setEditable(boolean b)

b)

void addActionListener(ActionListener a)

c)

void removeItem(Object anObject)

d)

void removeAllItems()

105.

Commonly used Methods of JComboBox

  • - it is used to add the ItemListener.

a)

void setEditable(boolean b)

b)

void addActionListener(ActionListener a)

c)

void addItemListener(ItemListener i)

d)

void removeAllItems()

106.

Commonly used Methods of JList

  • - it is used to add a listener to the list, to be notified each time a change to the selection occurs.

a)

void setEditable(boolean b)

b)

void addActionListener(ActionListener a)

c)

void addItemListener(ItemListener i)

d)

void addListSelectionListener(ListSelectionListener listner)

107.

Commonly used Methods of JList

  • - it is used to return the smallest selected cell index

a)

int getSelectedIndex()

b)

void addActionListener(ActionListener a)

c)

void addItemListener(ItemListener i)

d)

void addListSelectionListener(ListSelectionListener listner)

108.

Commonly used Methods of JList

  • - it is used to return the data model that holds a list of items displayed by the JList component

a)

int getSelectedIndex()

b)

ListModel getModel()

c)

void addItemListener(ItemListener i)

d)

void addListSelectionListener(ListSelectionListener listner)

109.

Commonly used Methods of JList

  • - it is used to create a read-only ListModel from an array of objects

a)

int getSelectedIndex()

b)

ListModel getModel()

c)

void setListData(Object[] listData)

d)

void addListSelectionListener(ListSelectionListener listner)

110.

Commonly used Methods of JProgressBar

  • - it is used to determine whether string should be displayed

a)

int getSelectedIndex()

b)

ListModel getModel()

c)

void setListData(Object[] listData)

d)

void setStringPainted(boolean b)

111.

Commonly used Methods of JProgressBar

  • - it is used to set value to the progress string

a)

void setString(String s)

b)

ListModel getModel()

c)

void setListData(Object[] listData)

d)

void setStringPainted(boolean b)

112.

Commonly used Methods of JProgressBar

  • - it is used to set the orientation, it may be either verical or horizontal by using SwingConstants.VERTICAL and SwingConstants.HORIZONTAL constants.

a)

void setString(String s)

b)

void setOrientation(int orientation)

c)

void setListData(Object[] listData)

d)

void setStringPainted(boolean b)

113.

Commonly used Methods of JProgressBar

  • - it is used to set the current value on the progress bar.

a)

void setString(String s)

b)

void setOrientation(int orientation)

c)

void setValue(int value)

d)

void setStringPainted(boolean b)

114.

Commonly used Methods of JSlider

  • - is used to set the minor tick spacing to the slider

a)

void setString(String s)

b)

void setOrientation(int orientation)

c)

void setValue(int value)

d)

public void setMinorTickSpacing(int n)

115.

Commonly used Methods of JSlider

  • - is used to set the major tick spacing to the slider

a)

public void setMajorTickSpacing(int n)

b)

void setOrientation(int orientation)

c)

void setValue(int value)

d)

public void setMinorTickSpacing(int n)

116.

Commonly used Methods of JSlider

  • - is used to determine whether tick marks are painted

a)

public void setMajorTickSpacing(int n)

b)

public void setPaintTicks(boolean b)

c)

void setValue(int value)

d)

public void setMinorTickSpacing(int n)

117.

Commonly used Methods of JSlider

  • - is used to determine whether labels are painted

a)

public void setMajorTickSpacing(int n)

b)

public void setPaintTicks(boolean b)

c)

public void setPaintLabels(boolean b)

d)

public void setMinorTickSpacing(int n)

118.

Commonly used Methods of JSlider

  • - is used to determine whether tracks is painted

a)

public void setMajorTickSpacing(int n)

b)

public void setPaintTicks(boolean b)

c)

public void setPaintLabels(boolean b)

d)

public void setPaintTracks(boolean b)

119.

is a component for placing text in a container

a)

JPasswordField(String text)

b)

JPasswordField(String text, int columns)

c)

Java JLabel

d)

JPasswordField(int columns)

120.

is a multi line region that displays text. It allows the editing of multiple line text. it inherits JTextComponent class.

a)

JPasswordField(String text)

b)

JPasswordField(String text, int columns)

c)

Java JLabel

d)

Java JTextArea

121.

is a text component that allows the editing of a single line text. it inherits JTextComponent class

a)

JPasswordField(String text)

b)

JPasswordField(String text, int columns)

c)

Java JLabel

d)

Java JTextField

122.

it is used to display a single line of read only text

a)

JPasswordField(String text)

b)

JPasswordField(String text, int columns)

c)

Java JLabel

d)

JPasswordField(int columns)

123.

the text can be changed by an application but a user cannot edit it directly. it inherits JComponent class

a)

JPasswordField(String text)

b)

JPasswordField(String text, int columns)

c)

Java JLabel

d)

JPasswordField(int columns)

124.

is used to create a checkbox.

a)

JPasswordField(String text)

b)

JPasswordField(String text, int columns)

c)

Java JLabel

d)

Java JCheckBox

125.

It is used to turn an option on (true) or off (false). Clicking on a CheckBox changes its state from "on" to "off" or from "off" to "on". It inherits JToggleButton class.

a)

JPasswordField(String text)

b)

JPasswordField(String text, int columns)

c)

Java JLabel

d)

Java JCheckBox

126.

is used to create a radio button.

a)

Java JRadioButton

b)

JPasswordField(String text, int columns)

c)

Java JLabel

d)

Java JCheckBox

127.

it is used to choose one option from multiple options. It is widely used in exam systems or quiz

a)

Java JRadioButton

b)

JPasswordField(String text, int columns)

c)

Java JLabel

d)

Java JCheckBox

128.

it should be added in ButtonGroup to select one radio button only

a)

Java JRadioButton

b)

JPasswordField(String text, int columns)

c)

Java JLabel

d)

Java JCheckBox

129.

is used to show popup menu of choices.

a)

Java JRadioButton

b)

Java JComboBox

c)

Java JLabel

d)

Java JCheckBox

130.

Choice selected by user is shown on the top of a menu. It inherits JComponent class.

a)

Java JRadioButton

b)

Java JComboBox

c)

Java JLabel

d)

Java JCheckBox

131.

is used to display data in tabular form. It is composed of rows and columns.

a)

Java JRadioButton

b)

Java JComboBox

c)

Java JTable

d)

Java JCheckBox

132.

represents a list of text items. The list of text items can be set up so that the user can choose either one item or multiple items. it inherits JComponent class.

a)

Java JRadioButton

b)

Java JComboBox

c)

Java JTable

d)

Java JList

133.

is simplest container class.

a)

Java JPanel

b)

Java JComboBox

c)

Java JTable

d)

Java JList

134.

it provides space in which an application can attach any other component. it inherits the JComponents class.

a)

Java JPanel

b)

Java JComboBox

c)

Java JTable

d)

Java JList

135.

it doesn't have title bar

a)

Java JPanel

b)

Java JComboBox

c)

Java JTable

d)

Java JList

136.

is used to display the progress of the task. It inherits JComponent class.

a)

Java JPanel

b)

Java JProgressBar

c)

Java JTable

d)

Java JList

137.

is used to create the slider. By using this, a user can select a value from specific range

a)

Java JPanel

b)

Java JProgressBar

c)

Java JSlider

d)

Java JList

138.

public class JButton extends AbstractButton implements Accessible

a)

JPasswordField(String text)

b)

JPasswordField(String text, int columns)

c)

Java JLabel

d)

JLabel class declaration

139.

public class JTextField extends JTextComponent implements SwingConstants

a)

JTextField class declaration

b)

JPasswordField(String text, int columns)

c)

Java JLabel

d)

JLabel class declaration

140.

public class JTextArea extends JTextComponents

a)

JTextField class declaration

b)

JTextArea class decalration

c)

Java JLabel

d)

JLabel class declaration

141.

public class JCheckBox extends JToggleButton implements Accessible

a)

JTextField class declaration

b)

JTextArea class decalration

c)

JCheckBox class declaration

d)

JLabel class declaration

142.

public class JRadioButton extends JToggleButton implements Accessible

a)

JTextField class declaration

b)

JTextArea class decalration

c)

JCheckBox class declaration

d)

JRadioButton class declaration

143.

public class JComboBox extends JComponent implements ItemSelectable, ListDataListener, ActionListener, Accessible

a)

JComboBox class declaration

b)

JTextArea class decalration

c)

JCheckBox class declaration

d)

JRadioButton class declaration

144.

public class JList extends JComponent implements Scrollable, Accessible

a)

JComboBox class declaration

b)

JList class decalration

c)

JCheckBox class declaration

d)

JRadioButton class declaration

145.

public class JPanel extends JComponent implements Accessible

a)

JComboBox class declaration

b)

JList class decalration

c)

JPanel class declaration

d)

JRadioButton class declaration

146.

public class JProgressBar extends JComponent implements SwingConstants, Accessible

a)

JComboBox class declaration

b)

JList class decalration

c)

JPanel class declaration

d)

JProgressBar class declaration