We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpIntegration › Performance issue embedding PApplet in (J)Frame
Page Index Toggle Pages: 1
Performance issue embedding PApplet in (J)Frame (Read 505 times)
Performance issue embedding PApplet in (J)Frame
Dec 3rd, 2008, 6:08am
 
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 Sad and I hope that this is the easiest way for somebody to help me out!

best,
Kevin

Page Index Toggle Pages: 1