You must import the JavaFX library (only rendering supported) with Processing 4:
import processing.javafx.*;
void setup()
{
size(200, 200, FX2D);
}
void draw()
{
}
See related issues with JavaFX and Processing 4:
- Implement ability to include module jars for preproc, completion, et al · Issue #522 · benfry/processing4 · GitHub
- Error trying to import JavaFX classes in Processing 4 · Issue #15 · processing/processing4-javafx · GitHub
Some work arounds:
Are you referring to this? This is a fork and I do not use this version.
You must clearly communicate what library you are using and provide a link if unclear.
In this case the Unfolding FX fork above (10 years old) may not be supported.
I do not use the Unfolding FX fork and can’t comment on it or support it.
This is the current Unfolding library 0.9.6 listed in Processing 4 and it states not compatible:
The latest Unfolding 0.9.92 link is available here and I am using it with success in Processing 4.3:
If I try to use the FX2D renderer with the 0.9.92 version in Processing 4.3 IDE there are issues with scrolling with mouse wheel.
I was able to scroll with the numpad + and - keys. :)
Scrolling issue with FX2D that seems to have carried over to Processing 4:
Have fun with this!
:)