Pro Java 9 Games Development Leveraging the JavaFX APIs

(Michael S) #1
Chapter 6 ■ Setting Up YoUr Java 9 iDe: an introDUCtion to netBeanS 9

NetBeans will also provide matching or missing code structure elements such as brackets, colons,
and semicolons so that you don’t get lost when you are creating complex, deeply nested, or exceptionally
dense programming constructs. You will be creating advanced Java constructs with these characteristics, as
you progress in your Java code complexity throughout this book as I take you from Java Game Developer to
Pro Java 9 Game Developer, and I will be sure to point out Java 8 and Java 9 code that is dense, complex, or
deeply nested as we implement it in your games.
NetBeans can also provide bootstrap code, such as the JavaFX game application bootstrap code that we
will be creating a bit later during this chapter, since I know you are eager to get started creating your Pro Java
9 Game. NetBeans 9 provides code templates that you can fill out and customize, coding tips and tricks, and
code refactoring tools. As your Java 9 code becomes more complex, it becomes a logical candidate for code
refactoring, which can make code easier to understand, easier to upgrade, and more efficient. NetBeans can
also refactor your code automatically.
In case you’re wondering what code refactoring is, it is changing the structure of existing computer code
to make it more efficient or scalable, without changing its external behavior (that is, what it accomplishes).
For instance, NetBeans can take legacy Java 7 code and make it more efficient by implementing the Lambda
Expressions introduced in Java 8.
NetBeans 9 will also provide pop-up helper dialogs, of one type or another, containing methods,
constants, asset references (all of which you will be learning about as you code your Pro Java 9 game during
this book), and even suggestions, regarding how to construct your Java statements. For instance, NetBeans
9 will suggest when it might be appropriate to use the Java 8 Lambda Expressions to make your code
streamlined and multithreading compatible.


Figure 6-2. NetBeans includes Files, Services, Projects, Navigator, and Output Panes (left top to bottom) as
well as a Java editor

Free download pdf