Due to the print book page limit, we cannot inlcude all good CheckPoint questions in the physical book. The CheckPoint on this Website may contain extra questions not printed in the book. The questions in some sections may have been reordered as a result. Nevertheless, it is easy to find the CheckPoint questions in the book on this Website. Please send suggestions and errata to Dr. Liang at y.daniel.liang@gmail.com. Indicate the book, edition, and question number in your email. Thanks!

Chapter 16 Check Point Questions

Section 16.2
16.2.1
How do you create a label with a node without a text?
16.2.2
How do you place a text on the right of the node in a label?
16.2.3
Can you display multiple lines of text in a label?
16.2.4
Can the text in a label be underlined?
Section 16.3
16.3.1
How do you create a button with a text and a node? Can you apply all the methods for Labeled to Button?
16.3.2
Why is the getPane() method protected in Listing 16.2? Why is the data field text protected?
16.3.3
How do you set a handler for processing a button-clicked action?
Section 16.4
16.4.1
What is the output of the following code?
public class Test {
  public static void main(String[] args) {
    Test test = new Test();
    test.new B().start();
  }
	
  class A {
    public void start() {
      System.out.println(getP());
    }
		
    public int getP() {
      return 1;
    }
  }
	
  class B extends A {
    public int getP() {
      return 2 + super.getP();
    }
  }
}
16.4.2
How do you test if a check box is selected?
16.4.3
Can you apply all the methods for Labeled to CheckBox?
16.4.4
Can you set a node for the graphic property in a check box?
Section 16.5
16.5.1
How do you test if a radio button is selected?
16.5.2
Can you apply all the methods for Labeled to RadioButton?
16.5.3
Can you set any node in the graphic property in a radio button?
16.5.4
How do you group radio buttons?
Section 16.6
16.6.1
Can you disable editing of a text field?
16.6.2
Can you apply all the methods for TextInputControl to TextField?
16.6.3
Can you set a node as the graphic property in a text field?
16.6.4
How do you align the text in a text field to the right?
Section 16.7
16.7.1
How do you create a text area with 10 rows and 20 columns?
16.7.2
How do you obtain the text from a text area?
16.7.3
Can you disable editing of a text area?
16.7.4
What method do you use to wrap text to the next line in a text area?
Section 16.8
16.8.1
How do you create a combo box and add three items to it?
16.8.2
How do you retrieve an item from a combo box? How do you retrieve a selected item from a combo box?
16.8.3
How do you get the number of items in a combo box? How do you retrieve an item at a specified index in a combo box?
16.8.4
What events would a ComboBox fire upon selecting a new item?
Section 16.9
16.9.1
How do you create an observable list with an array of strings?
16.9.2
How do you set the orientation in a list view?
16.9.3
What selection modes are available for a list view? What is the default selection mode? How do you set a selection mode?
16.9.4
How do you obtain the selected items and selected indices?
Section 16.10
16.10.1
How do you create a horizontal scroll bar? How do you create a vertical scroll bar?
16.10.2
How do you write the code to respond to the value property change of a scroll bar?
16.10.3
How do you get the value from a scroll bar? How do you get the maximum value from a scroll bar?
Section 16.11
16.11.1
How do you create a horizontal slider? How do you create a vertical slider?
16.11.2
How do you add a listener to handle the property value change of a slider?
16.11.3
How do you get the value from a slider? How do you get the maximum value from a slider?
Section 16.12
16.12.1
When the game starts, what value is in whoseTurn? When the game is over, what value is in whoseTurn?
16.12.2
What happens when the user clicks on an empty cell if the game is not over? What happens when the user clicks on an empty cell if the game is over?
16.12.3
How does the program check whether a player wins? How does the program check whether all cells are filled?
Section 16.13
16.13.1
How do you create a Media from a URL? How do you create a MediaPlayer? How do you create a MediaView?
16.13.2
If the URL is typed as liveexample.pearsoncmg.com/common/sample.mp4 without https:// in front of it, will it work?
16.13.3
Can you place a Media in multiple MediaPlayers? Can you place a MediaPlayer in multiple MediaViews? Can you place a MediaView in multiple Panes?
Section 16.14
16.14.1
Can you place a Media in multiple MediaPlayers? Can you place a MediaPlayer in multiple MediaViews? Can you place a MediaView in multiple Panes?
16.14.2
In Listing 16.15, what does the program do when a new nation is selected in the combo box?