28.04.2019 Views

[JAVA][Beginning Java 8 Games Development]

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 7 ■ The Foundation of Game Play Loop: The <strong>Java</strong>FX Pulse System and the Game Processing Architecture<br />

Figure 7-15. Click Run ➤ Project, and open the Output pane to see errors being generated in .handle()<br />

Clearly, NetBeans 8.0 does not always write optimal code for the bootstrap methods that it codes for us, so let’s<br />

remove the throw new UnsupportedOperationException("Not implemented yet."); line of code (see Figure 7-13).<br />

In its place, you will insert a <strong>Java</strong> comment, which creates for now what is termed an empty method, shown in<br />

Figure 7-16. This should allow your game application to run. Although the game application window did launch<br />

with the thrown errors, the components of the Scene Graph were not written to the scene, and only a default white<br />

background color could be seen. You will observe this if you are following along in NetBeans.<br />

www.it-ebooks.info<br />

157

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!