||This is the home page for ZenPongFX, an example application from the Pro JavaFX 2 Platform book. From a Windows machine (for now), click the icon on the left to launch ZenPongFX via Java Web Start. Note: Oracle is working on Mac and Linux implementations of JavaFX.
To fully examine the behavior of ZenPong, perform the following steps:
- Before clicking the Start button, drag each of the paddles vertically to other positions. One game cheat is to drag the left paddle up and the right paddle down, which will put them in good positions to respond to the ball after being served.
- Practice using the A key to move the left paddle up, the Z key to move the left paddle down, the L key to move the right paddle up, and the comma (,) key to move the right paddle down.
- Click the Start button to begin playing the game. Notice that the Start button disappears and the ball begins moving at a 45° angle, bouncing off paddles and the top and bottom walls.
- If the ball hits the left or right wall, one of your hands has lost the game.
Here's a screen shot of the ZenPong example application. Also, you may download the ZenPong source code in a NetBeans project. Please contact me at jim.weaver @ javafxpert.com with any feedback or issues.