If I recall, PApplet has a public member called frame which you can access, failing that, it might have a getFrame method.
All this is off the top of my head though.