Skip to main content

javaFX "do" and "do later" problem

2 replies [Last post]
Joined: 2006-01-11

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.
Joined: 2007-07-12

You can use animation in this case:

import javafx.animation.*;

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



Joined: 2008-05-25

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.