Skip to main content

javaFX "do" and "do later" problem

2 replies [Last post]
ederbaum
Offline
Joined: 2006-01-11
Points: 0

With the newest javaFX version all my code that uses "do" and "do later" doesn't work, and i have this message:

MyFX.fx:27: cannot find symbol
symbol : class do
location: class test.MyFX
do {
1 error
BUILD FAILED (total time: 1 second)

How to fix it??

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

You can use animation in this case:

[code]
import javafx.animation.*;

var timeline = Timeline {
keyFrames: KeyFrame {
time: 0.01s
action: function() {
// define your code here
}
}
repeatCount: java.lang.Double.POSITIVE_INFINITY
}

timeline.start();

[/code]

galien
Offline
Joined: 2008-05-25
Points: 0

hello ederbaum,
I've exactly the same problem with the compiler as i mentioned it in my previous post, are you using it?
I think we have to wait a little bit for the final version.
Instead of you can use java.awt.invokeLater for do later of or an extended thread FX class for non UI process. that's I'm using it an it's working.
In general we need more information about threading with javaFX.

alex