Thursday Aug 07, 2008

Update (12/11): With the release of JavaFX 1.0 this video and its contents are now outdated.

Click on the video below to check out a new video screencast published on NetBeans TV featuring JavaFX Engineering Director Nandini Ramani. In this screencast, Nandini will introduce you to the JavaFX Preview SDK, give you a quick overview of the JavaFX platform, and then walk you through some hands-on examples using NetBeans.  

 Watch for a cool opening demo in the beginning based on the Video Globe demo that was shown at JavaOne 2008 that features translucent JavaFX block swirling around the screen! Check it out!

Comments:

Is this example available as source?
If not, why not ?

Posted by Jensa on August 07, 2008 at 03:38 PM PDT #

Hi Jensa,

Here is the main.fx file from the circleDemo project that we created during the screencast. Please let me know if you have any questions.
Thanks,
Cindy

/*
* Main.fx
*
* Created on Jul 29, 2008, 12:44:07 PM
*/

package circledemo;

import javafx.application.Frame;
import javafx.application.Stage;
import javafx.scene.text.Text;
import javafx.scene.Font;
import javafx.scene.FontStyle;
import javafx.scene.geometry.Circle;
import javafx.scene.paint.Color;
import javafx.animation.Timeline;
import javafx.animation.KeyFrame;
import javafx.animation.Interpolator;

/**
* @author breh
*/
var radius:Number = 40;
var color:Color = Color.RED;
var opacity:Number = 0.0;

// place your code here
Frame {
title: "Circle Demo"
width: 200
height: 200
closeAction: function() {
java.lang.System.exit( 0 );
}
visible: true

stage: Stage {
fill: Color.BLACK
content: [Text {
font: Font {
size: 24
style: FontStyle.PLAIN
}
x: 25, y: 30
opacity: bind opacity
fill: Color.WHITE
content: "Hello JavaFX"
},
Circle {
centerX: 100, centerY: 100
radius: bind radius
fill: bind color
}
]
}
}

var t = Timeline {
autoReverse: true
repeatCount: Timeline.INDEFINITE
keyFrames : [
KeyFrame {
time : 0s
values : [
radius => 40 tween Interpolator.EASEBOTH,
color => Color.RED tween Interpolator.EASEBOTH,
opacity => 0.0 tween Interpolator.EASEBOTH,
]
},
KeyFrame {
time: 2s
values : [
radius => 60 tween Interpolator.EASEBOTH,
color => Color.YELLOW tween Interpolator.EASEBOTH,
opacity => 1.0 tween Interpolator.EASEBOTH,
]
}
]
}

t.start();

Posted by Cindy Church, Sun Learning Services on August 11, 2008 at 09:28 PM PDT #

Well... now that the final release of javaFX 1.0 is out MOST of that syntax and code is all wrong now!! Most of it doesn't work!! Please modify it so that it does please!!!

Posted by Jess on December 11, 2008 at 02:11 AM PST #

Javafx I hope to have ready-made tree, table components, there is the ability to flexibly the layout, so that the layout can be relatively free to develop a useful procedure.

I would like to put my jsf program into javafx procedures, so that can have a greater coverage, and better operating experience.

Unfortunately, javafx the loading speed is still too slow, then quick like, and load a simple scenario also appears slower.

If we can, like jsf + ajax, as the scene switches a little faster, it is really great, javafx development needs to be accelerated ah.

Posted by abercrobmie and fitch on November 27, 2009 at 11:11 PM PST #

Post a Comment:
  • HTML Syntax: NOT allowed