CJCoding With Joseph
15free / daySign inCreate account

Thompson Rivers University

Creating the Project & Window Layout

Assignment 5 User Interfaces FX - SM 2025

In this series, I will be using Eclipse. First make a new eclipse project by selecting: File > New > Project and then select JavaFx Project, press Next, name it something, then press Finished

Before we can add anything like buttons, sliders, or the square itself, we need to set up the main window and the layout that holds everything inside.

In JavaFX, the window is called a Stage, and everything you see inside it (buttons, shapes, text, etc.) lives inside a Scene. That scene is built on top of a root layout container, usually something like a VBox or HBox.

In our case, we’re going to use a VBox (vertical box layout) as the root container so we can stack everything vertically, like the:

Members only

Keep reading this lesson

You've reached the end of the free preview. Unlock the rest of this lesson plus 54 more lessons in Thompson Rivers University.

  • Unlimited coding questions
  • Unlimited access to all classroom material
  • Weekly live call for questions and guidance
  • 3,000 AI tutor tokens / month
  • Personal SQL database (3 MB)
  • Progress tracking

Cancel any time.