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 9 ■ Controlling Your Action Figure: Implementing <strong>Java</strong> Event Handlers and Using Lambda Expressions<br />

Handling NetBeans Unexpected Updates and Incorrect Warnings<br />

As I was “upgrading” my UI Button event handling code structures to use lambda expressions, as shown in Figure 9-7,<br />

I noticed a couple of things I wanted to take a couple of pages to address before I proceed to get into event handling.<br />

First of all, there is an incorrect warning “Parameter ActionEvent is not used,” which is incorrect, as an event handling<br />

construct inherently uses an ActionEvent object, and besides that, why don’t the other identical constructs above and<br />

below this exhibit the same warning? I ran the code and it all works great, so I am ignoring this highlight in NetBeans. I<br />

also am seeing a “39 updates found” message at the bottom-right of the IDE, and so I clicked on the blue link that said<br />

“click here to make your IDE up to date,” and I took a couple of screen shots showing the work process I went through<br />

to get my IDE updated. I am not sure where NetBeans got the 39 from, as there were hundreds of updates listed in an<br />

installer dialog, which is shown on the right side of Figure 9-7. As you can see there are numerous updates to <strong>Java</strong>FX,<br />

<strong>Java</strong> 8 and related packages, as well as to non-<strong>Java</strong> packages that are supported by NetBeans 8. I clicked on the Next<br />

button and invoked the download and update process, which took several minutes.<br />

Figure 9-7. Showing the incorrect lambda expression warning message and the 39 updates found notification message<br />

As you can see on the left-hand side of Figure 9-8, you will have to read and then accept all of those relevant<br />

licensing agreements that are required for you to download and install all of the software package upgrades which you<br />

will be upgrading to since you initially installed <strong>Java</strong> 8 and NetBeans (or since you last updated your IDE).<br />

194<br />

www.it-ebooks.info

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

Saved successfully!

Ooh no, something went wrong!