Exam 20: Graphical User Interfaces
Exam 1: Introduction76 Questions
Exam 2: Using Objects82 Questions
Exam 3: Implementing Classes108 Questions
Exam 4: Fundamental Data Types124 Questions
Exam 5: Decisions119 Questions
Exam 6: Loops107 Questions
Exam 7: Arrays and Array Lists117 Questions
Exam 8: Designing Classes88 Questions
Exam 9: Inheritance99 Questions
Exam 10: Interfaces100 Questions
Exam 11: Input/Output and Exception Handling108 Questions
Exam 12: Object-Oriented Design104 Questions
Exam 13: Recursion99 Questions
Exam 14: Sorting and Searching100 Questions
Exam 15: The Java Collections Framework102 Questions
Exam 16: Basic Data Structures102 Questions
Exam 17: Tree Structures102 Questions
Exam 18: Generic Classes75 Questions
Exam 19: Stream Processing85 Questions
Exam 20: Graphical User Interfaces75 Questions
Exam 21: Advanced Input/Output90 Questions
Exam 22: Multithreading81 Questions
Exam 23: Internet Networking74 Questions
Exam 24: Relational Databases75 Questions
Exam 25: XML74 Questions
Select questions type
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 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)
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 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
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)