• Home
  • Textbooks
  • Introduction to Programming with Java: A Problem Solving Approach
  • GUI Programming-Component Layout, Additional GUI Components

Introduction to Programming with Java: A Problem Solving Approach

John S. Dean, Raymond H. Dean

Chapter 17

GUI Programming-Component Layout, Additional GUI Components - all with Video Answers

Educators


Chapter Questions

01:42

Problem 1

Layout managers adapt automatically to changes in the size of a container or one of its components. (T / F)

Akshaya Rs
Akshaya Rs
Numerade Educator
00:36

Problem 2

Which package contains layout managers?

Norman Atentar
Norman Atentar
Numerade Educator
02:10

Problem 3

How does the FlowLayout manager arrange components?

SS
Sarvesh Somasundaram
Numerade Educator
01:01

Problem 4

Write a single statement that gives the current container a flow layout with right alignment.

Catt Huth
Catt Huth
Numerade Educator
01:09

Problem 5

What are the five regions established by the BorderLayout manager?

Marisa A
Marisa A
Numerade Educator
00:35

Problem 6

The sizes of the five regions in a border layout are determined at runtime based on the contents of the four outer regions. (T / F)

Hast Aggarwal
Hast Aggarwal
Numerade Educator
00:53

Problem 7

By default, how many components can you put in any one region of a border layout?

Erika Bustos
Erika Bustos
Numerade Educator
01:01

Problem 8

Write a single statement that adds a new JLabel with the text "Stop" to the center region of a BorderLayout manager. The label should be centered within the center region.

Ashley High
Ashley High
Numerade Educator
00:38

Problem 9

When you instantiate a GridLayout manager, you should always specify both the number of rows and the number of columns. (T / F)

Sheryl Ezze
Sheryl Ezze
Numerade Educator
00:34

Problem 10

In a grid layout, all cells are the same size. (T / F)

Sam Limsuwannarot
Sam Limsuwannarot
Numerade Educator
00:46

Problem 11

What happens to the $x$ Turn variable in the Tic-Tac-Toe program if you click the same cell twice?

Sherrie Fenner
Sherrie Fenner
Numerade Educator
03:11

Problem 12

Why are JPanel containers particularly useful with GridLayout and BorderLayout windows (as opposed to FlowLayout windows)?

Supratim Pal
Supratim Pal
Numerade Educator
01:50

Problem 13

In the MathCalculator program's createcontents method, what's the purpose of the add (new JLabel () ) ; statement?

Adam Conner
Adam Conner
Numerade Educator
02:10

Problem 14

JTextArea components are editable by default. (T / F).

SS
Sarvesh Somasundaram
Numerade Educator
02:10

Problem 15

JTextArea components employ line wrap by default. (T / F).

SS
Sarvesh Somasundaram
Numerade Educator
00:31

Problem 16

What happens if you click a check box that's already selected?

Aditya Sood
Aditya Sood
Numerade Educator
00:29

Problem 17

Provide a statement that creates a check box named attendance. The check box should be pre-selected, and it should have an "I will attend" label.

Ashley High
Ashley High
Numerade Educator
00:44

Problem 18

What happens if you click a radio button that is already selected?

Keshav Singh
Keshav Singh
Numerade Educator
00:44

Problem 19

What happens if you click an initially unselected radio button that is a member of a RadioGroup?

Keshav Singh
Keshav Singh
Numerade Educator
01:07

Problem 20

How are combo boxes and radio button groups similar?

Nicole Smina
Nicole Smina
Numerade Educator
01:10

Problem 21

What two methods can be called to determine the current selection for a combo box?

Adam Conner
Adam Conner
Numerade Educator
01:59

Problem 22

The JobApplication program contains the following code fragment. What happens to the program if the code fragment is omitted?
radioGroup = new ButtonGroup();
radioGroup.add(goodCitizen);
radioGroup.add(criminal);

SS
Sarvesh Somasundaram
Numerade Educator
23:42

Problem 23

Provide a statement that adds a 20 -pixel blank margin to a JPanel container named panel.

Brian Ketelobeter
Brian Ketelobeter
Numerade Educator
01:02

Problem 24

Provide a JSIider constructor call where the minimum value is $0,$ the maximum value is $50,$ and the initial value is $10 .$ Hint: Look up the answer on Sun's Java API Web site.

SS
Sarvesh Somasundaram
Numerade Educator