I need to dynamically load and unload a variety of PApplets into a Frame or JFrame to be able to step through various visuals. One of my more complex PApplets has a lot of trouble doing this, and I'm having a hard time understanding why. Run on its own, it regularly exceeds 60fps (that is, it has to be throttled). Inside a Frame or JFrame, it struggles to do 25fps. My other visuals run without any problem inside a Frame.
Below is a link to the code. SMSBoard will run with its main, and Main is an example of how I'm embedding it. The zip file contains all the jars I'm using, and is also an eclipse project -- just import it, or unzip it inside your workspace, and things should work fine. The only catch is that you'll have to update the paths to the jar files - to do so:
http://www.jibberia.com/SMSExample.zip
- right-click the project
- choose Properties
- then Java Build Path
- then Libraries
- remove the three offending jars
- "Add External Jars..." and navigate to wherever you put the project
- either select all 3 jars or do 'em one by one
I've packaged this up because I'm fairly desperate for help! Unfortunately the code is too complex to be a pde file
and I hope that this is the easiest way for somebody to help me out!
best,
Kevin