# Give some examples (Unfolding library)

**URL:** <https://discourse.processing.org/t/give-some-examples-unfolding-library/44362>\
**Category:** Libraries\
**Created:** [April 28, 2024, 11:29pm UTC](https://discourse.processing.org/t/give-some-examples-unfolding-library/44362 "2024-04-28T23:29:36Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [April 29, 2024, 10:55am UTC](https://discourse.processing.org/t/give-some-examples-unfolding-library/44362/3 "2024-04-29T10:55:22Z")

</div>

> [@Ciosiek](#):
>
> Can you provide me with simple example how to make working processing 4 with javafx

You must import the JavaFX library (only rendering supported) with Processing 4:

```auto
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](https://github.com/benfry/processing4/issues/522)
- [Error trying to import JavaFX classes in Processing 4 · Issue #15 · processing/processing4-javafx · GitHub](https://github.com/processing/processing4-javafx/issues/15)

Some work arounds:

- [JavaFX Unable to add modules to Processing IDE - #5 by svan](https://discourse.processing.org/t/javafx-unable-to-add-modules-to-processing-ide/41272/5)
- [Webview in Processing](https://discourse.processing.org/t/webview-in-processing/42599)

> [@Ciosiek](#):
>
> i’m trying to use processing 4 because it’s needed for Unfolding 0.9.6 library for javafx

Are you referring to this? This is a _[fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo)_ and I do not use this version.

- [GitHub - jimbok8/unfoldingFX: Integration of unfolding with JavaFX. A library to create interactive maps and geovisualizations in Processing and Java](https://github.com/jimbok8/unfoldingFX)

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_:

 ![Capture](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/e/c/ec77796cf5077293ecc84d1e36f6df4a2b852efa.png)

The latest Unfolding 0.9.92 link is available here and I am using it with success in Processing 4.3:

- [Template with examples not working · Issue #167 · tillnagel/unfolding · GitHub](https://github.com/tillnagel/unfolding/issues/167)

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:

- [mouseWheel() not working when using FX2D renderer · Issue #4169 · processing/processing · GitHub](https://github.com/processing/processing/issues/4169)

Have fun with this!

`:)`

---

_[View the full topic](https://discourse.processing.org/t/give-some-examples-unfolding-library/44362)._
