Skip to main content

Help me! about JavaFX Script in NetBeans 6.1

9 replies [Last post]
joecolejoe
Offline
Joined: 2008-06-18
Points: 0

This simple code works OK with JavaFX Pad

import javafx.ui.*;
import javafx.ui. canvas.*;
Frame {
title: "Hello World-style example for JavaFX Script"
height: 100
width: 400
content:
Canvas {
content:
Text {
font:
Font {
faceName: "Sans Serif"
style: BOLD
size: 24
}
x: 10
y: 10
content: "Hello World"
}
}
visible: true
}

But

When I created a new NetBeans 6.1 project

(my NetBeans IDE has been installed JavaFX plug-in: according to this guide at "http://javafx.netbeans.org/download-compiler-JFXplugin.html" ).

I copied this code directly
to the IDE's editor and there was error when I builded it:

Error: "symbol : variable BOLD"

When I deleted line: "style: BOLD", there was OK.

Please tell me why, and how to fix this problem (make it correct when keep this error line).

By the way

I want to download the JavaFX runtime, library files,
and demo programs from the Project OpenJFX web site.

The link is: "https://openjfx.dev.java.net/downloads.html"

I clicked the linked in "via tar.gz or zip file"
in "Source Code" section, and see no file to download.

Then I clicked "via Subversion", but I couldn't download
all of this package.

Please give me a correct link.

I'm a new English learner, so I'm sorry aobut by bad English.

THANK FOR ANY HELP!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
alexsch
Offline
Joined: 2007-07-12
Points: 0

>
> By the way
>
> I want to download the JavaFX runtime, library
> files,
> nd demo programs from the Project OpenJFX web site.
>
> The link is:
> "https://openjfx.dev.java.net/downloads.html"
>
> I clicked the linked in "via tar.gz or zip
> file"
> n "Source Code" section, and see no file to
> download.
>
> Then I clicked "via Subversion", but I couldn't
> download
> ll of this package.
>
> Please give me a correct link.

You can download the compiler version of JavaFX Script version from:
http://openjfx.java.sun.com site or https://openjfx-compiler.dev.java.net

joecolejoe
Offline
Joined: 2008-06-18
Points: 0

Thank U .

But how could I download 3 folders and 2 files list in "Browse source code" location from the link from U:
https://openjfx-compiler.dev.java.net/source/browse/openjfx-compiler/?re...

alexsch
Offline
Joined: 2007-07-12
Points: 0

You can checkout it using svn:
[code]
svn checkout https://openjfx-compiler.dev.java.net/svn/openjfx-compiler/trunk openjfx-compiler --username username
[/code]
or download the Milestone 3 Release zip file from:
http://openjfx.java.sun.com/builds/javafxc-M3

joecolejoe
Offline
Joined: 2008-06-18
Points: 0

Thank again.
By the way, Do U have a yahoo nickname?
If U don't mind, I would like to add your nick to my list so that I can easily talk to U about JavaFX.

alexsch
Offline
Joined: 2007-07-12
Points: 0

> By the way, Do U have a yahoo nickname?

Unfortunately not. But I have a nickname on this forum: nickname + @dev.java.net
You can also send all your question about JavaFX Script to the compiler alias: dev@openjfx-compiler.dev.java.net

joecolejoe
Offline
Joined: 2008-06-18
Points: 0

MenuItem {
text: "Open Project..."
mnemonic: KeyStroke.E
}

This code underlines letter 'e' in "Open" when I pressed Alt key.
But I want 'e' in "Project" is underlined instead of the first 'e', what code is?

Thank!

alexsch
Offline
Joined: 2007-07-12
Points: 0

The NetBeans 6.1 plugin uses the compiler version of JavaFX Script language
that require full constant name (ClassName.CONSTANT_NAME) now:

[code]
Font {
faceName: "Sans Serif"
style: FontStyle.BOLD
size: 24
}
[/code]

You can find the compiler version of JavaFX Script documentation at:
http://openjfx.java.sun.com/current-build/doc/index.html

joecolejoe
Offline
Joined: 2008-06-18
Points: 0

I don't known all ClassName.CONSTANT_NAME
so
1. Is there a version of NetBeans 6.1 plugin that doesn't require full constant name?
2. Or where could I find references about all ClassName.CONSTANT_NAME

Thank :-)

alexsch
Offline
Joined: 2007-07-12
Points: 0

> I don't known all ClassName.CONSTANT_NAME
> so
> 1. Is there a version of NetBeans 6.1 plugin that
> doesn't require full constant name?
It is a compiler issue, not NetBeans IDE

> 2. Or where could I find references about all
> ClassName.CONSTANT_NAME
Use JavaFX Script API http://openjfx.java.sun.com/current-build/doc/api/index.html