Exam 20: Graphical User Interfaces

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

Which layout manger would be best suited to create a simple navigation GUI with directional arrows for left, right, up, down and enter?

(Multiple Choice)
4.8/5
(42)

Which component can be added to a menu? i.JMenuBar II.JMenu III.JMenuItem

(Multiple Choice)
4.9/5
(38)

Which of the following defines the job of a ButtonGroup?

(Multiple Choice)
4.8/5
(32)

Which of the following statements is correct?

(Multiple Choice)
4.9/5
(34)

Which layout manager places objects left-to-right, row by row into a fixed set of rows and columns?

(Multiple Choice)
4.8/5
(30)

When the user selects a menu item, the menu item sends a(n) ___________________.

(Multiple Choice)
4.9/5
(34)

Which layout manager constructor call would be best-suited to create a telephone keypad GUI which has three rows of three keys that are labeled 1,2,3; 4,5,6; and 7,8,9; respectively, as well as a fourth row of three keys labeled *, 0, #?

(Multiple Choice)
5.0/5
(34)

A ____ is a combination of a list and a text field.

(Multiple Choice)
4.9/5
(35)

What is the easiest way to create complex-looking GUI layouts? i.use the GridBagLayout manager II.nest panels, each with its own layout manager III.use multiple layout managers in the same container

(Multiple Choice)
4.8/5
(47)

Which of the following is true about a border layout?

(Multiple Choice)
4.8/5
(33)

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.7/5
(40)

Which of the following adds a border to the following panel? JPanel panel = new JPanel();

(Multiple Choice)
4.8/5
(29)

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

(Multiple Choice)
4.8/5
(30)

What is wrong with the following code? class ExitListener implements ActionListener { public void actionPerformed(ActionEvent event) { System.exit(0); } } ActionListener exitListener = new ExitListener(); JMenu exitMenu = new JMenu("Exit"); exitMenu.addActionListener(exitListener); JMenuBar menuBar = new JMenuBar(); menuBar.add(exitMenu);

(Multiple Choice)
4.9/5
(36)

For a new programmer using the Swing JSlider component for the first time, which of these is the least important thing to know?

(Multiple Choice)
4.8/5
(31)

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

(Multiple Choice)
4.8/5
(31)

What is the general order of a pull-down menu (from top-level going downwards)?

(Multiple Choice)
5.0/5
(33)

What type of object can be added into a JComboBox by the addItem method?

(Multiple Choice)
4.7/5
(25)

The code below will not compile successfully unless the argument to the makeMenuItem method is final.Why not? public JMenuItem makeMenuItem(final String menuLabel) { JMenuItem mi = new JMenuItem(menuLabel); class MyMenuListener implements ActionListener { public void actionPerformed(ActionEvent e) { doSomethingElse(); System.out.println(menuLabel); } } mi.addActionListener(new MyMenuListener()); return mi; }

(Multiple Choice)
4.9/5
(46)

Which of the following is false about achieving complex layouts?

(Multiple Choice)
4.8/5
(36)
Showing 41 - 60 of 75
close modal

Filters

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