# Need help with FX2D renderer! (pls)

**URL:** https://discourse.processing.org/t/need-help-with-fx2d-renderer-pls/41235
**Category:** Processing
**Created:** [March 11, 2023, 6:07pm UTC](https://discourse.processing.org/t/need-help-with-fx2d-renderer-pls/41235 "2023-03-11T18:07:56Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Aryszin](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@Aryszin](https://discourse.processing.org/u/Aryszin)
#### Post date: [March 11, 2023, 6:07pm UTC](https://discourse.processing.org/t/need-help-with-fx2d-renderer-pls/41235/1 "2023-03-11T18:07:56Z")

</div>

In FX2D there are a few glitches/“features” and i wanna know if someone knows a fix;

focused Bug: this is really glitchy. i dont know how that works;

```auto
if(focused) text("focused",10,10);
if(!focused) text("not focused",10,10);

```

size Bug: its really weird

```auto
size(512,512); //completly normal
surface.setSize(513,512); //is more than just one pixel??

```

OBS Bug: Obs doest show any window even tho its running!

---

<div class="post-metadata">

### Author: ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)
#### Post date: [March 11, 2023, 9:31pm UTC](https://discourse.processing.org/t/need-help-with-fx2d-renderer-pls/41235/2 "2023-03-11T21:31:27Z")

</div>

I don’t believe JavaFX is fully implemented in Processing 4 even though the IDE writers appear to be using FX controls in their dialog windows. I’ve only been able to add text and graphics to windows, no controls. Window size in code that I have is set by Scene().

---

<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: [March 14, 2023, 10:10am UTC](https://discourse.processing.org/t/need-help-with-fx2d-renderer-pls/41235/3 "2023-03-14T10:10:13Z")

</div>

Hello @Aryszin,

Please include version of Processing that you are using in topics.

FX2D and Processing 4 GitHub issue:

> <https://github.com/benfry/processing4/issues/522>
>
> It's not currently possible to use other JavaFX classes from the PDE, even when …it's in use as a renderer: https://github.com/processing/processing4-javafx/issues/15
> 
> We'll need to see how to include .jar files from the modules path for preprocessing and compilation. Once that's set, getting them working with runtime shouldn't be too much trouble.

If you are using the _ **FX2D renderer** _ (see issues above for other use) with Processing 4.2 you must install the library first:

```auto
import processing.javafx.*;

void setup()
  {
  size (500, 500, FX2D);
  println("Renderer: " + g.getClass().getName());

  }
  
void draw()
  {
  }

```

Related:

> [@How to use JavaFX in Processing 4?](https://discourse.processing.org/t/how-to-use-javafx-in-processing-4/35842/3):
>
> Hello, There is a comment about this buried in here: [GitHub - processing/processing4: Processing 4.x releases (currently in “beta”) that use Java 17](https://github.com/processing/processing4)[Processing 4 · processing/processing4 Wiki · GitHub](https://github.com/processing/processing4/wiki/Processing-4)[Move JavaFX to a separate library in the Contributions Manager · Issue #348 · processing/processing4 · GitHub](https://github.com/processing/processing4/issues/348)[GitHub - processing/processing4-javafx: JavaFX library for Processing 4](https://github.com/processing/processing4-javafx)[Issues · processing/processing4-javafx · GitHub](https://github.com/processing/processing4-javafx/issues) Install the library: In your code: import processing.…

When sifting through information and history be mindful of the chronology and seek out the most current information.

`:)`
