Exam 14: Introduction to Swing Components
Exam 1: Creating Java Programs61 Questions
Exam 2: Using Data67 Questions
Exam 3: Using Methods Classes and Objects66 Questions
Exam 4: More Object Concepts66 Questions
Exam 5: Making Decisions66 Questions
Exam 6: Looping66 Questions
Exam 7: Characters Strings and the Stringbuilder68 Questions
Exam 8: Arrays66 Questions
Exam 9: Advanced Array Concepts66 Questions
Exam 10: Introduction to Inheritance66 Questions
Exam 11: Advanced Inheritance Concepts66 Questions
Exam 12: Exception Handling66 Questions
Exam 13: File Input and Output66 Questions
Exam 14: Introduction to Swing Components66 Questions
Exam 15: Advanced Gui Topics66 Questions
Exam 16: Graphics66 Questions
Select questions type
Java provides you with a Font class from which you can create an object that holds typeface and size information.
(True/False)
4.9/5
(33)
Write the statement to create a JLabel named welcome that holds the words "Welcome Home".
(Essay)
4.8/5
(33)
Which of the following statements will change the value displayed in a JLabel named hello ?
(Multiple Choice)
4.8/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)
4.8/5
(34)
Write the statement to add a tool tip that displays "Submit your form" to a button named submit .
(Short Answer)
4.9/5
(34)
A ____ is a Component used to trigger an action or make a selection when the user clicks it.
(Multiple Choice)
4.9/5
(38)
Which method overrides the default behavior for the JFrame to be positioned in the upper-left corner of the computer screen's desktop?
(Multiple Choice)
4.8/5
(38)
When you create a(n) ____, you can group several components, such as JCheckBox es, so a user can select only one at a time.
(Multiple Choice)
4.8/5
(34)
Which statements create a JLabel that holds the words "Happy birthday" and adds the greeting to a JFrame object named aGreeting?
(Multiple Choice)
4.8/5
(43)
You can use the setEnabled() method to make a component available or unavailable by passing true or false to it.
(True/False)
4.9/5
(37)
The ActionListener interface contains the ____ method specification.
(Multiple Choice)
4.8/5
(39)
Write the statement to create a layout manager named myLayout that centers components in each row.
(Essay)
4.8/5
(32)
You cannot change the font of strings displayed in GUI components.
(True/False)
4.9/5
(45)
Assume you have declared a JFrame named welcomeFrame . Write the statement to set the welcomeFrame object's size to 300 pixels horizontally by 110 pixels vertically. Create a second statement to set the JFrame 's title to display the text "My Sized Frame".
(Essay)
4.9/5
(35)
Write the statement to create a JButton named submitButton with the label "Submit your data".
(Short Answer)
4.9/5
(36)
Which method do you use to change the state of a JCheckBox ?
(Multiple Choice)
4.9/5
(39)
Showing 21 - 40 of 66
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)