- Practice using layouts import import import import import javafx.geometry.Pos javafx.scene.control javafx.scene.layout - Practice using layouts import...

This preview shows page 1 - 2 out of 2 pages.

/* Practice using layouts */ import javafx.geometry.Pos; import javafx.scene.control.*; import javafx.scene.layout.*; import javafx.event.ActionEvent; import javafx.event.EventHandler; public class NestedLayoutPractice extends BorderPane { private GameView gameView; private Label bottom; // ***** Task 1: declare an HBox named top // also declare three Button instance variables // that will be added to the HBox top. // These buttons will determine the grid size of the game: // 3-by-3, 4-by-4, or 5-by-5 HBox top = new HBox(); //hbox.setPadding(new Insets(15, 12, 15, 12)); Button button3 = new Button("3-by-3"); Button button4 = new Button("4-by-4"); Button button5 = new Button("5-by-5"); // task 1 ends here public NestedLayoutPractice( ) { super( ); // ***** Task 2: student code starts here // instantiate the GameView object GameView gameView; gameView = new GameView (3); // add gameView to the center of this BorderPane BorderPane.setAlignment(gameView,Pos.CENTER); // task 2 ends here bottom = new Label( "Have fun playing this Tile Puzzle game" ); setBottom( bottom ); // ***** Task 3: Student code restarts here
Image of page 1
Image of page 2

You've reached the end of your free preview.

Want to read both pages?

  • Fall '16
  • xxxxx
  • Subroutine, Hbox, Button instance variables

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes