 |
JavaFX 1.0 is here: On your desktop, in your browser, and on your mobile phone
Posted by terrencebarr on November 30, 2008 at 09:06 PM | Comments (3)
Updates:
- Check out this video with Jacob Lehrbaum, Sr. Product Line Manager for JavaFX Mobile
JavaFX 1.0 is here!
JavaFX is the expressive platform for creating and delivering rich Internet experiences across all the screens of your life: for web browsers and desktops - and (in preview) for mobile phones. Today's JavaFX 1.0 release includes these components
- The JavaFX development environment including the FX Script compiler and runtime tools, graphics, media, web services, and rich text libraries
- NetBeans 6.5 with JavaFX
- The JavaFX Production Suite
- The JavaFX Desktop Runtime
- The JavaFX Mobile Runtime (in preview)
What's unique about JavaFX?
- JavaFX allows developers to create expressive rich Internet applications quickly and easily across multiple screens, including mobile phones, desktops, televisions, and other consumer devices
- JavaFX provides a unified development model for building rich client applications that integrate immersive media - audio, video, vector graphics, rich text and web services
- JavaFX features a suite of designer and developer tools that enable an efficient, productive and iterative designer-developer workflow
- JavaFX combines the best capabilities of the Java platform with comprehensive, immersive media, graphics and JavaFX Script – a simple and intuitive scripting language
Because JavaFX leverages the power and pervasiveness of the Java platform JavaFX will run most everywhere Java is running today - including mobile devices.
On the Desktop. In the Browser. And on your Mobile Phone. Same code everywhere.
Ok, show me! ... glad you asked ;-)
Let's try out a simple but useful example of a JavaFX application with a nice little GUI that accesses a web service (Yahoo! Local Business search). You can deploy and run this application (using the exact same unmodified application code) on your desktop, within a browser, and on the mobile emulator (as well as on many MSA-compliant phones) with the touch of a button. It will give you a good idea what JavaFX is and how to get started with it.
I will be doing a screencast on this and other demos soon but for now here are the step-by-step instructions:

- Step 1 Download the latest Java 6 SDK Update 11 and install it
- Step 2 Download the latest NetBeans 6.5 with JavaFX 1.0 bundle ("Download Now") and install it
- Step 3 Start NetBeans 6.5
- Step 4 Create a new project called "Local Search" from the built-in samples (NetBeans menu: File>New Project>Samples>JavaFX>"Local Search") and hit "Finish" in the dialog to create the project
- Step 5 In the NetBeans "Project View" panel, right-click on the "Local Search" project and select "Properties". In the "Project Properties" dialog select the category "Run" and make sure "Standard Execution" is selected. Click "OK"
- Step 6 In the NetBeans toolbar click the big green run triangle (run button).
- Step 7 After a few seconds you will see a little window come up titled "Coffee Shops (1 of 5)". Here you can punch in a zip code and search for coffee shops in that location. The application actually does a RESTful web service call out to Yahoo! to retrieve live information. Clicking on the right and left arrows scrolls horizontally through the list of search results. Finally, hit the "X" close button.
- Step 8 Now run the same application in your web browser. In the "Project Properties" dialog (step 5) category "Run" now select "Run in Browser" and click "OK"
- Step 9 Again, click the run button in the NetBeans toolbar. After a few seconds a browser window will open, load the applet, and present the exact same application as before - but now running in your browser. No changes to the application code were necessary.
- Step 10 Now run the same application in the mobile emulator (sorry, at this point the mobile emulator is only available on Windows - so Mac users can't do this step right now). In the "Project Properties" dialog (step 5) category "Run" now select "Run in Mobile Emulator" and click "OK".
- Step 11 Hit the run button in the NetBeans toolbar. After a few seconds the mobile emulator will open and the application is loaded. Again, we see the exact same application as before - but now running on a MSA-compliant emulator. Again, same application code as before.
- Step 12 You should also be able to take the LocalSearch.jad and LocalSearch.jar files (in the "dist" directory of the project) and send them to an MSA-compliant mobile phone (via Bluetooth or some other mechanism) and the application should run there as well. Note that because this is a prerelease version of JavaFX Mobile it may not work perfectly on all MSA phones. Sony Ericsson Java Platform 8 phones generally have very good MSA stacks so it should work fine on those.
- Step 13 Open the file Main.fx in the NetBeans editor and browse the code to get a feeling for the anatomy of a JavaFX application.
As you can see JavaFX is a whole new ball game with many new exciting features and possibilities. I'll be talking about this and more over the next couple of weeks - especially with a focus on mobility.
Finding out more
Have fun playing with JavaFX!
Cheers,
-- Terrence
PS: For Linux and Solaris support see the JavaFX blog.
Bookmark blog post: del.icio.us Digg DZone Furl Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment
-
... and it still doesn't support Linux...
Posted by: ronaldtm on December 04, 2008 at 07:26 AM
-
See my comment on the last blog (scroll down): http://weblogs.java.net/blog/terrencebarr/archive/2008/12/coming_on_thurs.html
-- Terrence
Posted by: terrencebarr on December 04, 2008 at 07:56 AM
-
Update: Also see the javafx blog at http://blogs.sun.com/javafx/entry/a_word_on_linux_and
Posted by: terrencebarr on December 04, 2008 at 08:06 AM
|