Game Development Reference
In-Depth Information
Figure 2-4 . Showing virgin NetBeans 8.0 IDE (left) and a JavaFX New Project dialog (right)
In case you are wondering, the start page displays every time you start the
NetBeans IDE, and if you wanted to open the Start Page tab later on, perhaps to ex-
plore the Media Library section (demos) and tutorials, you can! To open the start page
at any time, you use the NetBeans IDE 8.0 Help menu and the Start Page submenu.
For future reference, I usually notate a menu sequence like this: Help Start Menu .
The first thing that you will want to do in NetBeans IDE 8.0 is create a new Invin-
ciBagel game project ! To accomplish this, you will use the NetBeans 8.0 New Project
series of dialogs. This is one of those helpful Java programming features that I men-
tioned earlier (see the section “NetBeans IDE 8.0 Is Smart: Put Your Editing into
Hyperdrive”) that creates a bootstrap project with the correct JavaFX libraries,
.main() and .start() methods, and import statements (for more details, see
Chapter 3 ) .
Click the File menu, at the top-left corner of the DE, as displayed in Figure 2-4
(left), and then select New Project (the first menu item). Note that to the right of this
selection, there is a keyboard shortcut given ( Ctrl+Shift+N ), in case you want to mem-
orize it.
If you want to use this keyboard short-cut to bring up the New Project series of dia-
logs, hold down the CTRL and Shift keys on your keyboard (both at the same time),
and while they are depressed (held down), press the N key. This will do the same thing
as using the File New Project menu sequence.
The first in the series is the Choose Project dialog, shown in Figure 2-4 (right).
Because you are going to use the powerful JavaFX new media engine in your game, se-
lect JavaFX from the list of programming language categories in the Categories pane,
and because a game is a type of application, select JavaFX Application from the Pro-
jects pane.
Remember that Oracle made JavaFX a part of Java 7 and Java 8, so a JavaFX game
is also a Java game, whereas before Java 7 (in Java 6), JavaFX was its own separate
programming language! The JavaFX engine had to be recoded as a Java (7 and 8) API
(set of libraries) for it to become a seamless part of the Java programming language.
The JavaFX API replaces AWT (Abstract Windowing Toolkit) and Swing, and al-
though these older UI design libraries can still be used in Java projects, they are nor-
mally used only by legacy (older) Java code so that those projects can compile and run
in Java 7 and 8. You will be compiling and running the new project you are creating
here a bit later in this chapter.
Note that there is a Description pane below the other panes that will tell you what
your selections will give you. In this case, that would be a new Java application with
Search WWH ::




Custom Search