Exam 12: GUI Applications–Part 2

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

If null is passed as an argument to the JFileChooser class's showOpenDialog method,

Free
(Multiple Choice)
4.8/5
(42)
Correct Answer:
Verified

D

What will be the result of the following code if the user simply clicks OK? JPanel panel = new JPanel(); Color selectedColor; SelectedColor = JColorChooser.showDialog(null, "Select a Color", Color.BLUE); Panel.setForeground(selectedColor);

Free
(Multiple Choice)
4.8/5
(38)
Correct Answer:
Verified

B

Which of the following is not a class used in constructing a menu system?

Free
(Multiple Choice)
4.9/5
(34)
Correct Answer:
Verified

C

The default selection mode for a JList component is

(Multiple Choice)
4.7/5
(38)

What will be the result when the following code is executed if addressList exists and has values stored in it, and addrList is an array with values stored in it? AddressList.setListData(addrList);

(Multiple Choice)
4.9/5
(34)

The JComboBox class is in this package.

(Multiple Choice)
4.8/5
(40)

If you call the JTextField component's setEditable method and pass false as the argument, then the text field becomes

(Multiple Choice)
4.8/5
(43)

What is returned by the JList class's getSelectedIndex method?

(Multiple Choice)
4.9/5
(43)

What will be the result when the following code is executed? ImagePanel = new JPanel(); ImageLabel = new JLabel(); ImagePanel.Add(imageLabel); ImageIcon sunnyFaceImage = new ImageIcon("SunnyFace.gif"); imageLabel.setIcon(sunnyFaceImage); Pack();

(Multiple Choice)
4.8/5
(37)

A mnemonic is

(Multiple Choice)
4.8/5
(41)

What will be displayed when the following code is executed? JLabel myLabel = new JLabel ("It's a beautiful morning!"); myLabel.setIcon(SunnyFace.gif);

(Multiple Choice)
4.8/5
(33)

The appearance of a particular system's GUI is known as its

(Multiple Choice)
4.8/5
(42)

Which of the following statements creates a horizontal slider component with a minimum value of 0, a maximum value of 50, and an initial value of 25?

(Multiple Choice)
4.8/5
(36)

If myList is a JList component, what will the value of item be after the following statement is executed? Item = myList.getSelectedIndex();

(Multiple Choice)
4.9/5
(38)

Just like regular radio button components, you must group radio button menu items in a button group in order to create a mutually exclusive relationship between them.

(True/False)
4.9/5
(38)

If nameList is an instance of a JList component, which of the following statements would display 4 rows in nameList.

(Multiple Choice)
4.7/5
(35)

You assign a tool tip to a component with the ________ method, which is inherited from the JComponent class.

(Multiple Choice)
4.9/5
(42)

If multiple items have been selected in a list component, you should use the getSelectedValues or getSelectedIndices methods to retrieve the selected items.

(True/False)
4.8/5
(31)

The ListSelectionListener interface is in the ________ package.

(Multiple Choice)
4.7/5
(34)

To change an application's look and feel, you call this static method of the UIManager class.

(Multiple Choice)
4.8/5
(28)
Showing 1 - 20 of 40
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)