Sometimes it seems that all the world's a Java developer--but I'm not. I am Nancy Hildebrandt, a technical writer at Sun Microsystems, and I have more of a scripting background.
If you're new to JavaFX, and especially if you're new to Java too, here's a learning trail you can follow. Feel free to take shortcuts and move around in the list. The fastest way to learn is to keep trying and changing the JavaFX Script code yourself.
I recommend installing NetBeans IDE with JavaFX, since it has quite a bit of JavaFX help built in, plus an error-checking device that alerts you to problems in your code.
- Build a very simple application of your own from scratch in the NetBeans IDE, such as creating a screen with simple text or one or two objects. If you get stuck, move ahead to the following steps to get more information.
- Work through the following tutorials, in the following order.
- Getting Started With JavaFX Technology
Shows you how to build and deploy a basic JavaFX application in the NetBeans IDE. - Learning the JavaFX Script Programming Language
Presents the basics of the JavaFX Script Programming Language - Building a GUI Application with JavaFX
Shows some of the JavaFX API objects that are most commonly used when building an application with a Graphical User Interface. - Media Browser Tutorial and Application, especially Module 1 Task 1
Module 1 Task has some basic information about setting up a scene and working with images.
- Getting Started With JavaFX Technology
-
Look at some of the articles and tech tips on the JavaFX Learn page. Each article and tech tip has an assigned level of Beginner, Intermediate, or Advanced. Here are the current articles and tech tips for beginners:
- 15 Minutes or Less: Basic JavaFX Graphics (video)
- Animation Basics for JavaFX Beginners
- Create a Quick-and-Dirty Reload Button
- Creating Buttons With a Rollover Effect
- Create an Easy Animated Line Graph
- How to Develop and Run JavaFX Applications Offline
Download the application when provided in the article, and make changes to it in the NetBeans IDE. Sometimes it's easier to figure out the purpose of an object when you can see what effect it has when you run the application.
- Consult the following reference documentation:
- JavaFX API documentation, especially the Master Index to look up information on individual classes or variables.
- JavaFX Language Reference: Although it's still in draft form, there's some good information you won't find anywhere else.
- Google searches (or any other search engine): there are lots of Web sites and blogs that have information about JavaFX.
-
Look at some of the JavaFX samples, especially some of the ones that extend what you have already learned, such as the following:
- Fading Transparent Window (more mouseover effects)
- Bounce: Nested Timeline Animation (a more complex animation example)
- Calculator Widget (based on concepts taught in the GUI tutorial)
When is there a little tutorial like "How to integrate JFX into your existing SWING application?" :-(
I really like watching JFX stuff. But it's currently totally irrelevant to me as I have all my GUIs SWING-only and won't change all of it to make it FX-only.
Posted by hi on April 29, 2009 at 01:05 AM PDT #
This sample shows integrating Swing and JavaFX:
http://javafx.com/samples/ExercisingSwing/index.html
You can integrate existing Swing code in a JavaFX application by using the SwingComponent.wrap() function. Future releases of JavaFX will include a new set of very easy to use controls, so you can incrementally port your application over to JavaFX one screen at a time.
Posted by Nancy on May 01, 2009 at 07:15 AM PDT #