Accepted answer

a bit hacky, but you can try creating a separate awt frame which is fullscreen and drop processing's applet into it. normally for fullscreen you should only need a frame with the screen dimensions and no decorations (title bar, close buttons, etc.) the catch is you can't 'undecorate' a java.awt.frame after it's been set to visible (even if you set visibility to false, attempt to undecorate, then make the frame visible again), so to go around this will simply have a separate frame instance, already undecorated and with the right dimensions into which we drop processing's frame content. also we need to tell processing the bounds are updated.

here's a quick sketch to illustrate the idea(press 'f' for fullscreen):

import java.awt.frame;
frame fullscreenframe;
void setup(){
  fullscreenframe = new  frame();
  fullscreenframe.setundecorated(true);//prepare an undecorated fullscreen frame since java won't allow you to 'undecorate' a frame after it's been set visible 
  fullscreenframe.addkeylistener(getkeylisteners()[0]);//pass key events from this applet to the fullscreen frame
void draw(){
  background((float)mousex/width * 255,(float)mousey/height * 255,0);
void keyreleased(){
  if(key == 'f') {
      setbounds(0,0,displaywidth,displayheight);//resize the skech
      fullscreenframe.add(frame.getcomponent(0));//add the applet to the fullscreen frame from processing's frame
      fullscreenframe.setvisible(true);//make our fullscreen frame visible
      frame.setvisible(false );//and hide processing's frame

Related Query

More Query from same tag