• Home
  • Textbooks
  • Starting Out with Java: From Control Structures through Objects
  • A First Look at CUI Applications

Starting Out with Java: From Control Structures through Objects

Tony Gaddis

Chapter 12

A First Look at CUI Applications - all with Video Answers

Educators


Chapter Questions

00:25

Problem 1

What is a frame? How do you create a frame with Swing?

Hossam Mohamed
Hossam Mohamed
Numerade Educator
03:31

Problem 2

How do you set a frame's size?

Meredith Moody
Meredith Moody
Numerade Educator
00:25

Problem 3

How do you display a frame on the screen?

Hossam Mohamed
Hossam Mohamed
Numerade Educator
00:25

Problem 4

What is a content pane?

Hossam Mohamed
Hossam Mohamed
Numerade Educator
00:25

Problem 5

What is the difference between a frame and a panel?

Hossam Mohamed
Hossam Mohamed
Numerade Educator
00:06

Problem 6

What is an event listener?

Amy Jiang
Amy Jiang
Numerade Educator
01:29

Problem 7

If you are writing an event listener class for a JButton component, what interface must the class implement? What method must the class have? When is this method execured?

Aditya Sood
Aditya Sood
Numerade Educator
02:10

Problem 8

How do you register an event listener with a JButton component?

SS
Sarvesh Somasundaram
Numerade Educator
02:10

Problem 9

How do you change the background color of a component? How do you change the color of text displayed by a label or a button?

SS
Sarvesh Somasundaram
Numerade Educator
01:32

Problem 10

How do you add a layout manager to a container?

Ethan Somes
Ethan Somes
Numerade Educator
00:15

Problem 11

Which layout manager divides a container into regions known as north, south, cast, west, and center?

Brandon Fox
Brandon Fox
Numerade Educator
00:53

Problem 12

Which layout manager arranges components in a row, from left to right, in the order they were added to the container?

Julie Silva
Julie Silva
Numerade Educator
00:53

Problem 13

Which layout manager arranges components in rows and columns?

Arron Martel
Arron Martel
Numerade Educator
08:37

Problem 14

How many components can you have at one time in a Bordertayout region? In a GridLayout cell?

Bryan Lynn
Bryan Lynn
Numerade Educator
02:10

Problem 15

How do you prevent the ardertayout manager from resizing a component that has been placed in its region?

SS
Sarvesh Somasundaram
Numerade Educator
02:10

Problem 16

How can you cause a content pane to be automatically sized to accommodate the components contained within it?

SS
Sarvesh Somasundaram
Numerade Educator
02:10

Problem 17

What is the default layout manager for a JFrane object's content pane? For a JPane1 object?

SS
Sarvesh Somasundaram
Numerade Educator
02:10

Problem 18

You want the user to be able to select only one item from a group of items, Which type of component would you use for the items, radio buttons or check boxes?

SS
Sarvesh Somasundaram
Numerade Educator
01:11

Problem 19

You want the user to be able to select any number of items from a group of items. Which type of component would you use for the items, radio buttons or check boxes?

Manisha Sarker
Manisha Sarker
Numerade Educator
01:03

Problem 20

What is the purpose of a ButtonGroup object?

Narayan Hari
Narayan Hari
Numerade Educator
00:22

Problem 21

Do you normally add radio buttons, check boxes, or both to a ButtonGroup object?

Brandon Fox
Brandon Fox
Numerade Educator
01:10

Problem 22

What type of event does a radio button generate when the user clicks on it?

Jayashree Behera
Jayashree Behera
Numerade Educator
00:20

Problem 23

What type of crent does a check box generate when the user clicks on it?

Joanna Quigley
Joanna Quigley
Numerade Educator
01:31

Problem 24

How do you determine in code whether a radio button is selected?

Anthony Han
Anthony Han
Numerade Educator
00:22

Problem 25

How do you determine in code whether a check box is selected?

Brandon Fox
Brandon Fox
Numerade Educator
02:10

Problem 26

What method do you use to set a border around a component?

SS
Sarvesh Somasundaram
Numerade Educator
00:36

Problem 27

What is the preferred way of creating a Border object?

Margaret Farmer
Margaret Farmer
Numerade Educator