Write a program that generates the CSS color names window shown in Figure 17.18. In your program,

Question:

Write a program that generates the CSS color names window shown in Figure 17.18. In your program, implement a TilePane container named table with setPrefColumns(4), setHgap(5), setVgap(2), and setStyle("-fx-padding: 5, 0, 0, 5"). For each tile in table, embed a FlowPane container named panel with setPrefWidth(183) and setStyle("-fx-font-size: 10;"). Each panel should hold two components:

(1) A four-space Label named swatch that displays a color using a CSS color name, and

(2) An anonymous Label that displays a description for the color swatch at its left. Set the swatch colors with setStyle("-fx-background-color: " + names[i]), where names is an array shown in the following program skeleton.

public class ColorTable extends Application ( private final int TABLE WIDTH = 768; private final int

Figure 17.18:

* ticTacToe.css * Dean & Dean * Provides CSS rules for the TicTacToe program. .root ( } -fx-pref-width: 240;

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: