Make processing and awt work togheter

I am doing an application in eclipse that uses mostly processing for the front-end and some awt components. this has lots of advantages because of the functionality of processing in both graphics and devices integration (arduino, cameras ecc...) are really good and easy to use. I basicly add awt components to the PApplet at the beginning and the use the draw loop to do other stuff. The problem im experiencing its that many times the draw loop stop working at the beginning(if not it wont stop later), mostly because of push,pop issues. I was told once that the awt thread and processing didnt mix well togheter, is it unavoidable to have problems in using both? has any workaround emerged yet?



  • If you are only using AWT to provide GUI controls such as buttons, sliders etc then use one of the GUI libraries such as controlP5 or G4P instead.

  • i will look into that (and it seems also cool), but if possible i wanted to keep some components like file dropboxes and autosuggestors that i found written in java using awt. also anything new i may come to know.

  • I wouldn't recommend it. Use G4P or ControlP5.

  • i want to try some more, is there some material to understand in depth how the PApplet (processing 2.0)embedded in a Frame interacts with the components that are added to it(PApplet) ?

  • Not that I know of but there are many discussion on the forum that might help.

    The forum search engine is useless, it is better to use the search box on the main processing website as it uses Google to search the whole Processing website including the forum.

  • edited May 2017

    A) You're using Processing 2, not recommended.
    B) The documentation for Processing 3 itself is greatly lacking, and you're expecting that you'll find much information on Processing 2?

    How about you just go learn how to use graphics in Java directly, you might save more time that way?

Sign In or Register to comment.