Exam 11: Advanced User Interfaces

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

When you use a timer, you need to define a class that implements the ____ interface.

(Multiple Choice)
4.8/5
(40)

How do the lifetimes of the three objects menuLabel, mi, and the anonymous object new MyMenuListener()compare? Public JMenuItem makeMenuItem(final String menuLabel) { JMenuItem mi = new JMenuItem(menuLabel); Class MyMenuListener implements ActionListener { Public void actionPerformed(ActionEvent

(Multiple Choice)
5.0/5
(33)

You can add a(n) _________ to a panel to make it visible.

(Multiple Choice)
4.8/5
(40)

Which of the following statements is correct?

(Multiple Choice)
4.9/5
(32)

What is the container for top-level menu items?

(Multiple Choice)
4.8/5
(29)

Which layout manager allows you to add components to it by invoking the container's add method with the component as the only argument to add. I FlowLayout II BorderLayout III GridLayout

(Multiple Choice)
4.7/5
(33)

The ChangeEvent class defines no methods. What makes it possible to call the getSource method on a ChangeEvent object?

(Multiple Choice)
4.8/5
(38)

The ____ class in the javax.swing package generates a sequence of events, spaced apart at even time intervals.

(Multiple Choice)
4.9/5
(33)

Based on the statement below, which of the following adds a title to the border? JPanel panel = new JPanel();

(Multiple Choice)
4.7/5
(29)

Which of the following GUI objects generate(s) action events? I JComboBox II JRadioButton III JButton

(Multiple Choice)
4.9/5
(37)

Which method can a program use to set the selected choice in a JComboBox?

(Multiple Choice)
4.8/5
(43)

When using a combo box, the _______ displays the name of the current selection.

(Multiple Choice)
4.8/5
(42)

By default, a JPanel uses a _______ layout.

(Multiple Choice)
4.8/5
(40)

Which of the following methods returns the object that was selected in the JComboBox?

(Multiple Choice)
4.7/5
(46)

Which layout manager uses a grid so that each component will always be placed into an area of the same size? I GridBagLayout II BorderLayout III GridLayout

(Multiple Choice)
4.7/5
(38)

Use the ____ method to add a mouse listener to a component.

(Multiple Choice)
4.8/5
(46)

What type does the method getSelectedItem in the JComboBox class return?

(Multiple Choice)
4.9/5
(32)

Which of the following classes has a Boolean state that can be set or unset through the GUI?

(Multiple Choice)
4.7/5
(31)

In Java, each container has its own ____________________, which determines how the components are laid out.

(Multiple Choice)
4.8/5
(39)

Which code will create a JSlider with a range from 0 to 100, with an initial value of 50? I new JSlider() II new JSlider(0, 100, 50) III new JSlider(50, 0, 100)

(Multiple Choice)
4.9/5
(34)
Showing 21 - 40 of 91
close modal

Filters

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