# JavaFX Processing Sketch doesnt draw()

**URL:** https://discourse.processing.org/t/javafx-processing-sketch-doesnt-draw/12797
**Category:** Coding Questions
**Created:** [July 18, 2019, 6:58pm UTC](https://discourse.processing.org/t/javafx-processing-sketch-doesnt-draw/12797 "2019-07-18T18:58:41Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![poboyd](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/poboyd/32/8908_2.png) [@poboyd](https://discourse.processing.org/u/poboyd)
#### Post date: [July 18, 2019, 6:58pm UTC](https://discourse.processing.org/t/javafx-processing-sketch-doesnt-draw/12797/1 "2019-07-18T18:58:41Z")

</div>

Hi, I am running a processing sketch by calling it from a JavaFX application…

**public**  **class** Main **extends** Application {

**public** pro sketch;

@Override

**public**  **void** init() **throws** Exception {

sketch = **new** pro();

sketch.run();

}

Then…

**public**  **class** pro **extends** PApplet {

**public**  **void** run(){

String[] processingArgs = {“main.java.test.pro”};

PApplet. _runSketch_ (processingArgs, **this** );

}

**public**  **void** setup() {

minim = **new** Minim( **this** );

ETC…

}

**public**  **void** draw() {

**if** (frameCount % 100 == 0){

System. _ **out** _ .println(“In Draw:” + frameCount);

}

ETC

This works well for me on two Windows PCs I have but a third one, which is not as powerful but not very old, the processing sketch never draws, the canvas appears but then just nothing. I can see code in setup is run when I add lots of logging but in the Minim( **this** ) “this” is null as if the sketch hasn’t had time to load itself properly.

If anyone has any suggestions that would be great but are there other areas I can check for internal PApplet logs or perhaps some PApplet methods I could call to check its state.

Any help much appreciated.

---

<div class="post-metadata">

### Author: ![poboyd](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/poboyd/32/8908_2.png) [@poboyd](https://discourse.processing.org/u/poboyd)
#### Post date: [April 10, 2020, 1:15pm UTC](https://discourse.processing.org/t/javafx-processing-sketch-doesnt-draw/12797/2 "2020-04-10T13:15:30Z")

</div>

I decided in the end this was just because it was a rubbish PC!
