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

Android Studio books just to be thorough. This shows readers where everything is located in the IDE menuing
system, so everything gets covered. If you haven’t already, run your new JavaFXGame Application now. Once
you run your compiled Java 9 and JavaFX code, a window will open up over the NetBeans IDE with your
software running in it, as shown on the right of Figure 6-9. Currently it uses the popular Hello World sample
application.


Click and hold your left mouse button down on top of the divider line between the Java 9 code editing
pane and the Output tab at the bottom of the code editor pane and drag this divider line up, resizing your
relative window space. The space is shared between the JavaFXGame.java code editing pane and an Output



  • JavaFXGame information pane. Doing this resizing operation will reveal your Output tab and its compile
    info contents, as is shown in Figure 6-9.
    This Output tab will contain different types of output for NetBeans 9, such as compile operation output,
    run operation output (which is shown in Figure 6-9), profiler operation output (which we will be taking a
    look at later in the book when we have something to profile), and even output from your application itself
    (which we will look at here).
    You may have noticed, in Figure 6-7, that your code for a bootstrap Java and JavaFX application uses
    a green System.out.println("Hello World!"); Java statement on line 23 , so if you wanted to see the
    application that you are currently running print to the Output Pane (this is what out means and is often
    referred to as the Output Console), you would click the Say “Hello World” button in the Hello World app
    that is currently running on top of your IDE.
    Once you click the button, the words “Hello World!” should appear in the Output tab under the red text
    that says that it is executing your JavaFXGame.jar file. A JAR file is a Java ARchive (J for Java, and AR for
    Archive) file and is one of the distributable formats available for your Java 9 application.
    Part of the compile process involves creating this file, so if your compiled version works, you can have
    your JAR file ready to distribute when all of your application design, programming, testing, and optimization
    is complete.


Figure 6-9. Drag up the separator bar to reveal the Output area of the IDE (running application seen at right)

Free download pdf