We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello! I'm having some trouble on trying to integrate JavaSE + Processing.
I'll explain: I am doing a app to show the tumor grouth and I have some variables that I have to throw into my program, I'm doing this by code but my purpose is to do some forms with JFrame and call a class to execute the app. I am using Eclipse, I imported the Processing libraries into Eclipse and it's running when I don't use JavaSE. The trouble shows up when I am at the Java SE forms and I throw the informations. I don't know what to do. Look at here:
GameModel gameModel = new GameModel(tamX, tamY, tamPix); RandGame g = new RandGame(gameModel); //What I have to do now? Call g.draw()? g.setup()? Other method?
I, obviously, tried to run g.draw() and g.setup() and I got a error stack that if I run directly the Processing class I don't get.
Forgive me if you don't understand my problem, I'm from Brazil and I'm not used to write this kinda text in English.
Thank!
By: Ericson
Answers
https://processing.org/reference/libraries/#gui
http://forum.processing.org/two/discussions/tagged?Tag=#multiplewindows
Alternatively, some people create a Swing application and integrate Processing in a JFrame, as a visualization panel.
Now I'm confused. @GoToLoop said I can't do that kinda integration I want and @PhiLho said I can. Could you explain a little more about that please? @PhiLho, what I wanna do is exactly this, but how I can do? I notice that if I use JFrame I get a error strack...
Thanks for answering me. By: Ericson
I wrote about a Swing application (a Java application using Swing for its display), and integrating Processing display into it.
GoToLoop wrote about writing a Processing sketch and trying to use Swing inside it. Because of the threading model of sketches, they don't work well with Swing.
Ok, thanks for the explanation. Do you have some kind of tutorial of this processing gui you've said? I'll try to implement this gui but I don't know how, if you could please send me an implementation example.
Thanks.
By: Ericson
Both G4P & ControlP5 GUI libraries are extensively used in this forum:
Thanks guys! I'll study these libraries.