« The JavaFX SDK Packages are Taking Shape | Main | JavaFX API Documentation Tool Now Supports In-line Examples »

July 03, 2008

Comments

Piotr Hełka

I don't know why the example above doesn't work for me:
-NetBeans IDE 6.1 (Build 200804211638)
-1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05

What's wrong? Has something change since July?

I had to make your code more like this:

package jfx_book;

import javafx.application.Frame;
import javafx.application.Stage;
import javafx.scene.text.Text;
import javafx.scene.FontStyle;
import javafx.scene.Font;


Frame {
title: "Hello World-style example for JavaFX Script"
height: 100
width: 400
stage:
Stage {
content:
Text {
font:
Font {
name: "Sans Serif"
style: FontStyle.BOLD
size: 24
}
x: 15
y: 50
content: "Hello JavaFX Script Developer!"
}
}
// Show the Frame on the screen
visible: true
}

The comments to this entry are closed.

Categories