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 › Swing resizing PApplet
Page Index Toggle Pages: 1
Swing resizing PApplet (Read 1294 times)
Swing resizing PApplet
Oct 6th, 2009, 8:46am
 
So I'm trying to get PApplet to resize in a JFrame, but I haven't found anything that works.

I've added the PApplet into a JFrame, so my processing sketch shows up and is usable. But as the JFrame is resized the containing PApplet won't resize along with it.

Reading up on the API it tells you to call frame.setResizable(true), however the frame is null.

Can anyone explain what I might be doing wrong or have a code snippet where resizing works?
Re: Swing resizing PApplet
Reply #1 - Oct 7th, 2009, 1:01am
 
Apparently using the method size() in the PApplet's setup method causes the PApplet to ignore any resize events.

My solution was to remove the line that had it.
Page Index Toggle Pages: 1