JavaFX: The preview has landed
Written by on July 31st, 2008 in Uncategorized.
JavaFX was announced at JavaOne…. in 2007, and we are now seeing a preview release.
Josh Marinacci of the JavaFX team put together a post with an example that builds the following:

The code for this is simply:
-
-
package blogdemo;
-
-
import javafx.scene.*;
-
import javafx.scene.paint.*;
-
import javafx.scene.geometry.*;
-
import javafx.application.*;
-
import javafx.scene.transform.*;
-
import javafx.input.*;
-
import javafx.animation.*;
-
import java.lang.System;
-
-
var angle = 0.0;
-
-
Frame {
-
windowStyle: WindowStyle.TRANSPARENT visible: true
-
width: 400 height: 400
-
stage: Stage {
-
fill: null
-
content: Group {
-
translateX: 100 translateY: 100
-
content: for(i in [0..10]) {
-
// here is the magic with binding
-
width: 100 height: 100 arcHeight: 10 arcWidth: 10
-
transform: bind [
-
Transform.rotate(-i*36+angle/2,50,50),
-
Transform.translate(angle/4,0),
-
]
-
}
-
}
-
}
-
}
-
}
-
-
var anim = Timeline { keyFrames: [
-
KeyFrame { time: 0s values: angle => -360 tween Interpolator.EASEBOTH },
-
KeyFrame { time: 2s values: angle => 360 tween Interpolator.EASEBOTH },
-
]
-
autoReverse: true
-
repeatCount: Timeline.INDEFINITE
-
};
-
anim.start();
-
And you can check out the application if you have Java 1.6 installed.
Michael Coté got together with the Sun folks and recorded a demo and interview:
I am interested to see what Sun does with JavaFX, but I have to admit to being underwhelmed and more excited about what Sun could do with the Java plugin and have that as a way to interact with Ajax applications.
Source: Ajaxian » Front Page
Original Article: http://feeds.feedburner.com/~r/ajaxian/~3/351660309/javafx-the-preview-has-landed