From the course: Learning NetBeans

Unlock the full course today

Join today to access over 22,700 courses taught by industry experts or purchase this course individually.

Create a GridPane layout

Create a GridPane layout

From the course: Learning NetBeans

Start my 1-month free trial

Create a GridPane layout

- [Instructor] For the sign-in form, we're going to use the GridPane layout because it enables you to create a flexible grid of rows and columns in which to lay out controls. You can place these controls in any cell in the grid and you can make controls span cells as needed. Now I'm going to go ahead and paste in the code to create the GridPane right over here. Before primaryStage.show, and after setting the title. Now we're going to go ahead and walk through this, but the first thing that I want to point out is that the squiggly red line is indicating that we need to import the necessary namespaces. So for example here, if I click on the bulb it gives me the option to fix this error, and the first thing that I know that I need is to import the GridPane namespace. And when I do that it'll go away because it would have imported it, as you can see on line 13. And the same is going to go for line 28 and line 31. However, I already know all the namespaces that I need but I did want to at…

Contents