I agree it would be nice to be able to control exactly when something paints, but unfortunately you can not. The best you can do is specify a "maximum number of miliseconds" until the paint() method will be called, using 'JPanel.repaint( long milis )'. In case you were wondering, that is why your JPanel's paint() method calls 'worldFrame.repaint()' rather than 'worldFrame.paint( g )'
The reason you can't call a child component's paint( g ) directly from the parent's paint() method, is because what that does is pass the parent's Graphics instance to the child's paint() method so the child will paint onto the parent (which is hidden behind the child) instead of painting onto itself. This will slow down your applet, since the JPanel's paint method is being called twice when there are "dirty regions" (once when AWT called the JApplet's paint() method and once when AWT called the JPanel's paint() method). Not only that, you can't even save a handle to the different Graphics instance to use that instead, since it is different every time paint() gets called.
That being said, it should be pretty easy to change from active rendering into inactive. I would use something like this (I'm not at a computer where I can test this at the moment, so let me know if it doesn't work):
First, create a method in your JApplet that gets called whenever something changes (you could simply use 'repaint()', unless there are things you want to do first). If you need to call this method from your JPanel or Canvas classes (which you probably do), then create a global static handle to your JApplet, or pass a handle to it in the constructors for your JPanel and Canvas classes.
public void somethingChanged()
{
// do whatever else you need to do here, then:
this.repaint();
}
Second, your applet's paint() method, tell the JPanel to repaint().
public void paint( Graphics g )
{
if( worldFrame != null )
worldFrame.repaint();
}
Finally, your JPanel's paint() method, render the scene and tell the Canvas to repaint().
public void paint( Graphics g )
{
if( buffer != null && world != null )
{
buffer.clear();
world.renderScene( buffer );
world.draw( buffer );
buffer.update();
if ( buffer.usesRenderer( IRenderer.RENDERER_OPENGL ) && cGLScene != null )
{
buffer.displayGLOnly();
cGLScene.repaint();
}
}
}