简体   繁体   中英

Use Processing PDE files within Java?

I have a working Java code that I would like to visualize using processing. I also found the tutorial on how to include processing within eclipse and am also already able to create a canvas, etc.

What I want to do now is to actually do the visualization. I found a nice project that is exactly what I need. However, the author provides PDE files.

How can I include PDE files in my java project? Is that even possible?

The PDE files that are available in that project are simply text files. You can either use them in your code directly, or better yet, try to understand what they're doing and adapt the code to your own purposes.

But to answer your question, you don't include PDE files in a Java project. You included the Processing library jars on your classpath, which give you access to things like the PApplet class. Then you can include a PApplet (which is just like a Processing sketch, in fact a Processing sketch is a PApplet) in your Java application and pass it whatever information you want.

More info here: http://processing.org/tutorials/eclipse/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM