Exam 14: Introduction to Swing Components

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

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
(80)

A method that executes because it is called automatically when an appropriate event occurs is an event ____.

(Multiple Choice)
5.0/5
(76)

How have user interface components changed since the early versions of Java?

(Essay)
4.8/5
(80)

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
(91)

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
(72)

To specify an italic font, you pass ____ to the constructor.

(Multiple Choice)
4.9/5
(89)

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
(93)

Write the statement to create a JCheckBox object named feeWaived that is selected. Include the label "Fee Waived".

(Essay)
4.8/5
(85)

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
(70)

The ____ responds to keyboard events.

(Multiple Choice)
4.8/5
(74)

The ____ method of JCheckBox sets the state of the JCheckBox to true for selected or false for unselected.

(Multiple Choice)
4.9/5
(73)

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
(90)

The ActionListener interface contains the ____ method specification.

(Multiple Choice)
4.9/5
(78)

A ____ is a Component the user can click with a mouse to make a selection.

(Multiple Choice)
4.9/5
(95)

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.9/5
(77)

Write the statement to create a JLabel named welcome that holds the words "Welcome Home".

(Essay)
4.9/5
(80)

Describe the FlowLayout manager.

(Essay)
4.9/5
(84)

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
(76)

In a(n) ____________________ program, the user might initiate any number of events in any order.

(Short Answer)
4.8/5
(77)

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
(75)
Showing 21 - 40 of 74
close modal

Filters

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