Question: In the AfricanCountries program in Figure 18.10, suppose there is no setMaxSize method call. What would the resulting window look like? Figure 18.10: /************************************************************** *
In the AfricanCountries program in Figure 18.10, suppose there is no setMaxSize method call. What would the resulting window look like?
Figure 18.10:

/************************************************************** * African Countries.java * Dean & Dean * * This produces centered component in each Border Pane area. **************************************************************/ import javafx. application. Application; import javafx. stage.Stage; import javafx.scene.*; import import javafx.scene.control.Button; import javafx. geometry.*; javafx.scene.layout. Border Pane; public void start (Stage stage) ( public class African Countries extends Application ( // Scene, Node createContents (pane); { Border Pane pane = new Border Pane(); Scene scene = new Scene (pane, 320, 160); stage.setScene (scene); stage.show(); } // end start // Pos, Insets. stage.setTitle("African Countries"); //*********************************************************** private void createContents (Border Pane pane) pane.setCenter (new Button ("Central African Republic")); pane.set Top (new Button("Tunisia")); pane.setRight(new Button("Somalia")); pane.setBottom (new Button ("South Africa")); pane.setLeft (new Button ("Western Sahara")); pane.setPadding(new Insets (6)); for (Node child pane.getChildren()) { } } // end createContents 3 // end class African Countries. makes button's label span two lines. Generates padding Inside pane's perimeter. ((Button) child).setMaxSize (Double.MAX_VALUE, Double.MAX_VALUE); Border Pane.setMargin(child, new Insets (2));
Step by Step Solution
3.40 Rating (162 Votes )
There are 3 Steps involved in it
The image provided shows source code for a JavaFX application named AfricanCountriesjava which arran... View full answer
Get step-by-step solutions from verified subject matter experts
