Questions from Starting Out With Java


Q: What is an event-driven program?

What is an event-driven program?

See Answer

Q: Assume that a class inherits from the JFrame class. Write code

Assume that a class inherits from the JFrame class. Write code that can appear in the class constructor, which gives the content pane a FlowLayout manager. Components added to the content pane should...

See Answer

Q: Which layout container divides a container into regions known as top,

Which layout container divides a container into regions known as top, bottom, left, center, and right?

See Answer

Q: What is the purpose of the Application class’s abstract start

What is the purpose of the Application class’s abstract start method?

See Answer

Q: What package are the Label, Button, and TextField classes in

What package are the Label, Button, and TextField classes in?

See Answer

Q: What is an image’s aspect ratio? How do you

What is an image’s aspect ratio? How do you make sure it is preserved when you resize an image?

See Answer

Q: How do you retrieve the text that the user has entered into

How do you retrieve the text that the user has entered into a TextField control?

See Answer

Q: In CSS, what is the difference between a type selector and

In CSS, what is the difference between a type selector and an ID selector?

See Answer

Q: You want the user to be able to select only one item

You want the user to be able to select only one item from a group of items. Would you use RadioButton controls or CheckBox controls?

See Answer

Q: What is the purpose of a ToggleGroup?

What is the purpose of a ToggleGroup?

See Answer