Exam 14: Introduction to Swing Components
Exam 1: Creating Java Programs68 Questions
Exam 2: Using Data74 Questions
Exam 3: Using Methods, Classes, and Objects68 Questions
Exam 4: More Object Concepts67 Questions
Exam 5: Making Decisions70 Questions
Exam 6: Looping72 Questions
Exam 7: Characters, Strings, and the Stringbuilder73 Questions
Exam 8: Arrays74 Questions
Exam 9: Advanced Array Concepts74 Questions
Exam 10: Introduction to Inheritance70 Questions
Exam 11: Advanced Inheritance Concepts70 Questions
Exam 12: Exception Handling65 Questions
Exam 13: File Input and Output74 Questions
Exam 14: Introduction to Swing Components74 Questions
Exam 15: Advanced Gui Topics69 Questions
Exam 16: Graphics74 Questions
Exam 17: Applets, Images, and Sound72 Questions
Select questions type
Match each term with the correct statement below.
-Popup windows that can help a user understand the purpose of components in an application
(Multiple Choice)
4.8/5
(38)
A method that executes because it is called automatically when an appropriate event occurs is an event ____.
(Multiple Choice)
5.0/5
(35)
How have user interface components changed since the early versions of Java?
(Essay)
4.8/5
(33)
The ____________________ layout manager places components in a row, and when a row is filled, it automatically spills components into the next row.
(Short Answer)
4.8/5
(48)
A(n) ____________________ consists of a label positioned beside a square; you can click the square to display or remove a check mark.
(Short Answer)
4.8/5
(39)
To specify an italic font, you pass ____ to the constructor.
(Multiple Choice)
4.8/5
(44)
When setting a JFrame's size, part of the area is unusable because it is consumed by the JFrame's title bar and borders.
(True/False)
4.8/5
(41)
Write the statement to create a JCheckBox object named feeWaived that is selected. Include the label "Fee Waived".
(Essay)
4.8/5
(41)
You define the text to be displayed in a tool tip by using the setToolTipText() method and passing an appropriate ____ to it.
(Multiple Choice)
4.8/5
(31)
The ____ method of JCheckBox sets the state of the JCheckBox to true for selected or false for unselected.
(Multiple Choice)
4.9/5
(37)
You can call a JFrame's setDefaultCloseOperation() method and use ____ as an argument to keep the JFrame visible and continue running the program.
(Multiple Choice)
5.0/5
(43)
The ActionListener interface contains the ____ method specification.
(Multiple Choice)
4.8/5
(31)
A ____ is a Component the user can click with a mouse to make a selection.
(Multiple Choice)
4.9/5
(40)
import javax.swing.*;
public class JFrameLook
{
public static void main(String[] args)
{
_________________________
JFrame myFrame = new JFrame("Look and Feel");
myFrame.setSize(300, 120);
myFrame.setVisible(true);
}
}
In the shaded line above, write the statement to set the JFrame's look and feel using the setDefaultLookAndFeelDecorated() method.
(Essay)
4.8/5
(38)
Write the statement to create a JLabel named welcome that holds the words "Welcome Home".
(Essay)
4.9/5
(37)
Write the code to build a JComboBox named sideDish with no arguments. Then, create the addItem() methods to provide options for "Fries", "Salad", and "Fruit".
(Essay)
4.9/5
(29)
In a(n) ____________________ program, the user might initiate any number of events in any order.
(Short Answer)
4.8/5
(34)
When creating a Font object, the typeface name must be enclosed in double quotation marks because it is a String.
(True/False)
4.7/5
(37)
Showing 21 - 40 of 74
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)