Questions from Starting Out With Java


Q: If you want to display an image in a layout container,

If you want to display an image in a layout container, do you add an Image object, or an ImageView object to the layout container?

See Answer

Q: How do you set the width and height of an ImageView?

How do you set the width and height of an ImageView?

See Answer

Q: If you want to make sure that an image does not appear

If you want to make sure that an image does not appear stretched after it is resized, what method do you call?

See Answer

Q: If you want to change the image that an ImageView object is

If you want to change the image that an ImageView object is displaying, what method do you call?

See Answer

Q: Write a method named timesTen. The method should accept a double

Write a method named timesTen. The method should accept a double argument, and return a double value that is ten times the value of the argument.

See Answer

Q: What is the difference between spacing and padding, in regard to

What is the difference between spacing and padding, in regard to layout containers?

See Answer

Q: What package is the Insets class in?

What package is the Insets class in?

See Answer

Q: How do you set the horizontal and vertical spacing in a GridPane

How do you set the horizontal and vertical spacing in a GridPane container?

See Answer

Q: Once you have created a GridPane container, how do you add

Once you have created a GridPane container, how do you add a control to a ­specific column and row?

See Answer

Q: What is an event? Give an example.

What is an event? Give an example.

See Answer