Exam 11: Advanced User Interfaces
Exam 1: Introduction96 Questions
Exam 2: Fundamental Data Types103 Questions
Exam 3: Decisionseasy99 Questions
Exam 4: Loops100 Questions
Exam 5: Methods94 Questions
Exam 6: Arrays and Arraylists100 Questions
Exam 7: Inputoutput and Exception Handling100 Questions
Exam 8: Objects and Classes101 Questions
Exam 9: Inheritance and Interfaces99 Questions
Exam 10: Graphical User Interfaces54 Questions
Exam 11: Advanced User Interfaces91 Questions
Exam 12: Object-Oriented Design100 Questions
Exam 13: Recursion100 Questions
Exam 14: Sorting and Searching99 Questions
Exam 15: The Java Collections Framework100 Questions
Exam 16: Basic Data Structures94 Questions
Exam 17: Tree Structures100 Questions
Exam 18: Generic Classes78 Questions
Exam 19: Streams and Binary Inputoutput82 Questions
Exam 20: Multithreading82 Questions
Exam 21: Internet Networking74 Questions
Exam 22: Relational Databases75 Questions
Exam 23: XML74 Questions
Exam 24: Web Applications74 Questions
Select questions type
How do you add two buttons to the south area of a frame using the BorderLayout?
(Multiple Choice)
4.9/5
(37)
____________________ are round and have a black dot when selected.
(Multiple Choice)
4.8/5
(35)
Consider the following code snippet:
Class MouseClickedListener implements ActionListener
{
Public void mouseClicked(MouseEvent event)
{
Int x = event.getX();
Int y = event.getY();
Component.moveTo(x,y);
}
}
What is wrong with this code?
(Multiple Choice)
4.8/5
(38)
A ________ is a user-interface component with two states: checked and unchecked.
(Multiple Choice)
4.8/5
(47)
A complex GUI can be created with a set of nested panels. What should determine the components that go into a single panel?
(Multiple Choice)
4.8/5
(33)
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.9/5
(29)
When method makeMenuItem is called, how many objects are being created?
Public JMenuItem makeMenuItem(final String menuLabel)
{
JMenuItem mi = new JMenuItem(menuLabel);
Class MyMenuListener implements ActionListener
{
Public void actionPerformed(ActionEvent
(Multiple Choice)
4.8/5
(30)
When the user selects a menu item, the menu item sends a(n) ___________________.
(Multiple Choice)
4.7/5
(32)
Which elements of creating a graphical user interface are made easier by a GUI builder?
I creating event handlers
II configuring component properties
III adding components
(Multiple Choice)
4.7/5
(38)
If one ChangeListener is listening for three different JSlider objects, how can we determine which of the three sliders caused the event when the code enters the stateChanged method?
(Multiple Choice)
4.9/5
(31)
Which component can be added to a menu?
I JMenuBar
II JMenu
III JMenuItem
(Multiple Choice)
4.9/5
(45)
What can be determined about obj from the code below?
JMenuItem menuItem = new JMenuItem("Exit");
MenuItem.addActionListener(obj);
(Multiple Choice)
4.8/5
(26)
When adding a component to a container with the ____ layout, specify the NORTH, EAST, SOUTH, WEST, or CENTER position.
(Multiple Choice)
4.7/5
(36)
Consider the following code snippet:
Final RectangleComponent component = new RectangleComponent();
MouseListener listener = new MousePressListener();
Component.addMouseListener(listener);
______________
Mystery.add(component);
Mystery.setSize(FRAME_WIDTH, FRAME_HEIGHT);
Mystery.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Mystery.setVisible(true);
Which of the following statements completes this code?
(Multiple Choice)
4.8/5
(38)
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)
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.8/5
(30)
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
(35)
Consider the following code snippet:
Class MouseClickedListener implements MouseListener
{
Public void mouseClicked(MouseEvent event)
{
Int x = event.getX();
Int y = event.getY();
Component.moveTo(x,y);
}
Public void mousePressed(MouseEvent event) {}
Public void mouseEntered(MouseEvent event) {}
Public void mouseExited(MouseEvent event) {}
}
What is wrong with this code?
(Multiple Choice)
4.7/5
(38)
Showing 61 - 80 of 91
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)