Exam 19: Graphical User Interfaces
Exam 1: Introduction98 Questions
Exam 2: Using Objects76 Questions
Exam 3: Implementing Classes103 Questions
Exam 4: Fundamental Data Types125 Questions
Exam 5: Decisions120 Questions
Exam 6: Loops128 Questions
Exam 7: Arrays and Array Lists118 Questions
Exam 8: Designing Classes95 Questions
Exam 9: Inheritance101 Questions
Exam 10: Interfaces85 Questions
Exam 11: Inputoutput and Exception Handling109 Questions
Exam 12: Object-Oriented Design104 Questions
Exam 13: Recursion110 Questions
Exam 14: Sorting and Searching109 Questions
Exam 15: The Java Collections Framework110 Questions
Exam 16: Basic Data Structures104 Questions
Exam 17: Tree Structures110 Questions
Exam 18: Generic Classes75 Questions
Exam 19: Graphical User Interfaces76 Questions
Exam 20: Streams and Binary Inputoutput82 Questions
Exam 21: Multithreading82 Questions
Exam 22: Internet Networking74 Questions
Exam 23: Relational Databases75 Questions
Exam 24: XML74 Questions
Exam 25: Web Applications75 Questions
Select questions type
What type does the method getSelectedItem in the JComboBox class return?
Free
(Multiple Choice)
4.9/5
(38)
Correct Answer:
A
What method is required by the ChangeListener interface?
Free
(Multiple Choice)
4.8/5
(35)
Correct Answer:
C
The _______ interface toolkit has a large set of user-interface components.
Free
(Multiple Choice)
4.8/5
(31)
Correct Answer:
C
If the method makeMenuItem is called four times, how many MyMenuListener objects will be created? public JMenuItem makeMenuItem(String menuLabel)
{
JMenuItem mi = new JMenuItem(menuLabel);
Class MyMenuListener implements ActionListener
{
Public void actionPerformed(ActionEvent
(Multiple Choice)
4.9/5
(38)
Suppose a JPanel with a BorderLayout manager contains two components: component1, which was added to the EAST, and component2, which was added to the WEST. Which parts of the JPanel appear?
I North
II South
III Center
IV West
V East
(Multiple Choice)
4.9/5
(39)
Suppose a JPanel with a BorderLayout manager contains two components: component1, which was added to the CENTER, and component2, which was added to the SOUTH. Which parts of the JPanel will appear?
I North
II South
III Center
IV West
V East
(Multiple Choice)
4.8/5
(35)
If the makeMenuItem method is called four times, at most how many different actions can be performed by these four newly created MenuItem objects when the doSomethingElse method is called? public JMenuItem makeMenuItem(String menuLabel)
{
JMenuItem mi = new JMenuItem(menuLabel);
Class MyMenuListener implements ActionListener
{
Public void actionPerformed(ActionEvent
(Multiple Choice)
4.9/5
(37)
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
(33)
Which of the following adds a border to the following panel? JPanel panel = new JPanel();
(Multiple Choice)
4.8/5
(40)
What can be determined about obj from the code below? JMenuItem menuItem = new JMenuItem("Exit");
MenuItem.addActionListener(obj);
(Multiple Choice)
4.8/5
(42)
Which layout manager uses a grid, but allows selected grid locations to span multiple rows or columns?
I GridBagLayout
II BorderLayout
III GridLayout
(Multiple Choice)
4.9/5
(42)
Which layout manager allows you to add components in different orders, with the result being the same GUI appearance?
I FlowLayout
II BorderLayout
III GridLayout
(Multiple Choice)
4.9/5
(38)
Which method can a program use to set the selected choice in a JRadioButton?
(Multiple Choice)
4.8/5
(44)
Which layout manager constructor call would be best-suited to create a telephone handset GUI which has three rows of three keys each with labels, 1,2,3,4,5,6,7,8,9, and a fourth row with labels *, 0, and #?
(Multiple Choice)
4.9/5
(36)
The statement that would add smallButton to the button group in the following code is _________. JRadioButton smallButton = new JRadioButton("Small");
ButtonGroup group = new ButtonGroup();
(Multiple Choice)
4.8/5
(33)
Showing 1 - 20 of 76
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)