Over a million developers have joined DZone.

Speeding up the JavaFX Presentation Cube for Jfokus

DZone's Guide to

Speeding up the JavaFX Presentation Cube for Jfokus

· Java Zone ·
Free Resource

Java-based (JDBC) data connectivity to SaaS, NoSQL, and Big Data. Download Now.

I'll be traveling to Stockholm in a few days to give a University session on JavaFX at Jfokus on January 27, 2009.  During that week on January 29-30 I'll also be teaching an intensive two-day class on creating JavaFX applications, with a focus on developing Rich Internet Applications.  In the past I've used a rotating cube developed in JavaFX to display static and dynamic (executing JavaFX code) content.


The cube uses the PerspectiveTransform effect to do faux-3D, and was running at around 10 frames per second.  I asked Stephen Chin if he could tune it up a bit, and he sent me back a modified program that consistently achieves 60+ FPS on my dual core 2.4 GHz Vista machine.  In a later post Stephen and I will point out the optimization techniques used, but for now I wanted to give you a Java Web Start link to try it out: 


To see the FPS that the cube is achieving on your machine, take a look at the Java console.  It also displays any acceleration type in use.  Here's my console output for reference:

Acceleration Type is: Direct3D
Animation FPS: 62
Animation FPS: 64
Animation FPS: 64
Animation FPS: 64
Animation FPS: 64
Animation FPS: 64
Animation FPS: 64
Animation FPS: 64
Animation FPS: 63
Animation FPS: 64

By the way, the presentation slides in the example that you'll be running are dated, but I'll post the actual Jfokus presentation cube on this blog for you shortly after the session.  Also, as I mentioned in yesterday's WidgetFX 1.0 post, I'll show you the code for this presentation cube as well as walking through how to tweak the code to convert it into a WidgetFX widget.

Jim Weaver

Connect any Java based application to your SaaS data.  Over 100+ Java-based data source connectors.


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}