Exam 13: Advanced GUI Applications

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

The default selection mode for a JList component is:

(Multiple Choice)
4.9/5
(28)

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

(Multiple Choice)
4.7/5
(28)

When a JList component is added to a JScrollPane object, a border will automatically appear around the list.

(True/False)
4.9/5
(40)

You can create a label with an image, or with both an image and text.

(True/False)
4.8/5
(31)

What will display when the following code is executed? JButton button = New JButton ("It is a beautiful day."); Button.setIcon(SunnyFace.gif);

(Multiple Choice)
4.9/5
(37)

If the letter chosen as the mnemonic is in the component's text, the first occurrence of that letter will appear ________ when the component is displayed.

(Multiple Choice)
4.9/5
(38)

Both AWT classes and Swing classes ultimately inherit from the Component class.

(True/False)
4.9/5
(41)

The getSelectedIndex method returns:

(Multiple Choice)
5.0/5
(42)

Images may be displayed in labels and:

(Multiple Choice)
4.7/5
(35)

By default the scroll bars are always displayed in a JList component.

(True/False)
4.8/5
(36)

To add the JList object addressList to a scroll pane named scrollPane, use the following:

(Multiple Choice)
4.7/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.9/5
(41)

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

(Multiple Choice)
4.9/5
(40)

If the combo box addressBox contains a list of strings, why is the returned value of getSelectedItem method in the following code cast to String? String selectedAddress; SelectedAddress = (String)addressBox.getSelectedItem();

(Multiple Choice)
4.9/5
(34)

When an item in the combo box is selected, the combo box executes its action event listener's actionPerformed method, passing:

(Multiple Choice)
4.9/5
(44)

A menu within a menu is called what?

(Multiple Choice)
4.8/5
(29)

A label's preferred size is determined only by calling the setPreferredSize method.

(True/False)
4.9/5
(37)

The ImageIcon class constructor accepts:

(Multiple Choice)
4.9/5
(37)
Showing 41 - 58 of 58
close modal

Filters

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