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 › accessing "frame" from eclipse
Page Index Toggle Pages: 1
accessing "frame" from eclipse (Read 844 times)
accessing "frame" from eclipse
Jul 26th, 2007, 7:03pm
 
hi,

After a bit of trial and error I got my sketch running as an applet from within eclipse.
However, if I try to call a method of "frame", e.g. frame.setUndecorated(true), I get a NullPointerException. Actually frame is null.
Is there a way to access the window/frame properties within eclipse?

Thanks!
Patrick
Re: accessing "frame" from eclipse
Reply #1 - Jul 26th, 2007, 10:32pm
 
'frame' is set up by PApplet.main(), so unless you're calling that, the frame variable won't be used.

PApplet is a component, so you're supposed to make your own Frame and embed as you wish:
http://dev.processing.org/reference/core/javadoc/processing/core/PApplet.html
Re: accessing "frame" from eclipse
Reply #2 - Jul 26th, 2007, 11:57pm
 
thank you, it's working perfectly now.

this helped a lot, too:
Processing: Creative Coding and Computational Art
By Ira Greenberg
Sample Chapter: # Appendix C: Integrating Processing within Java
http://www.friendsofed.com/extras/159059617X/Integrating-Processing-Within-Java.pdf

Thanks!
Page Index Toggle Pages: 1