Exam 14: Introduction to Swing Components

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

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)

What class is the immediate parent of JFrame ?

(Multiple Choice)
4.9/5
(39)

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)

How do you modify whether or not a JTextField can be edited?

(Essay)
5.0/5
(40)

A ____ is a Component used to trigger an action or make a selection when the user clicks it.

(Multiple Choice)
4.9/5
(38)

What is the immediate parent class of JTextField ?

(Multiple Choice)
5.0/5
(30)

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)

How can you customize the appearance of a JFrame ?

(Essay)
4.8/5
(40)

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
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)