OMG... this project is semi-dead!!!
I maintained this project for quite a while and it should still be usable for up to processing 1.5.x.

The future however is uncertain, read more about this in the processing forums:


FullScreen API For Processing v 0.98.4 (changes)


Hey there! I am a library for Processing for better fullscreen support. Download me now!  → all versions
p.s. i do crash sometimes. if you think you can help just send me a message in the processing discourse section.


Online javadoc reference here.

Short Reference

fs = new FullScreen(this)
Creates a new fullscreen object.
fs = new SoftFullScreen(this)
Will create a big window without frames that overlays the screen. This will allow you create a sketch that is dual screen. However, be aware that you'll have to disable screensaver, app notifications and active corners yourself! Also you won't be able to change the resolution.

fs.enter() / fs.leave()
Enters / leaves fullscreen mode.
fs.setResolution(x, y)
Changes the resolution if you are in fullscreen mode. If not it memorizes the resolution and sets it the next time you enter fullscreen mode. By default it will try to use the sketch size as resolution.
Enables/disables keyboard shortcuts.

To enter/leave fullscreen mode
Windows: Alt+Enter, Ctrl+F
Linux: Ctrl+F
OS X: ⌘+F
ESC: leave fullscreen / exit application

Shortcuts are enabled by default!


Download the file and extract it to <processing-sketches>/libraries/.

You can also download if you wanna take a look at the sourcecode. It's MIT licensed, if you make usefull changes let the world know about it!

Example Usage

import fullscreen.*; 

FullScreen fs; 

void setup(){
  // set size to 640x480
  size(640, 480);
  // 5 fps

  // Create the fullscreen object
  fs = new FullScreen(this); 
  // enter fullscreen mode

void draw(){
  // Do your fancy drawing here...
  for(int i = 0; i < 10; i++){

      i*10, i*10,
      width - i*20, height - i*20


Does the fullscreen api sometimes make your sketch crash? Do you wish it'd be easier to use? Any other annoying things you noticed? Suggestions? Or are you just happy? Leave a message!

31 Jul 2009, 20:23 sascha thanks for the library! looking forward to seeing progress in OPENGL support! we definately need this! thanks!
21 Sep 2009, 13:47 cristian I am trying to install on a computer with a panasonic digital projector connected. Although FullScreen can read the resolutions and knows the projector is there as screen number 1, I cant get the sketch to displaz on the chosen monitor. It always defaults to the main screen (0) and the second screen is black (1)

Its a real headache for me right now, any help appreciated

// very basic demonstration of the fullscreen api's capabilities
import fullscreen.*;

FullScreen fs;

void setup(){
size(screen.width, screen.height);

// 5 fps

// Create the fullscreen object
fs = new FullScreen(this, 1);

// enter fullscreen mode

println (screen.width);

17 Oct 2009, 15:07 hansi @christian - odd... do you have *any* output on the command line?
15 Nov 2009, 18:51 hansi, releasing update next week. for now please try the test-version (at the top of the screen)...
there's won't be many changes, just want to wait a little more if crazy bugs arise.
21 Nov 2009, 03:06 JF There is no bug. Thats nice. Thanks for the lib friend :)

May i ask a question ? :)
-is it possible (not in your lib... im juste asking) to show the applet, only on the second screen?
26 Nov 2009, 16:28 hansi @JF -
yes, you can do something like this:
frame.setLocation( 500, 500 );

@ everyone else... new library is out...(0.98.1)
29 Nov 2009, 23:44 hansi, @everyone:
minor bugfix for mac-version. please upgrade to 0.98.2 if possible!
11 Dec 2009, 11:37 Adam Hi Hansi

Usally I don't have problems when installing new libraries for Processing but your FullScreen API for Processing puzzles me a bit:

First of all Processing wants me to put the fullscreen library in my sketchbook/libraries/ folder... It is placed there...

Secondly I don't seem to have af fullscreen/library folder (?)

I have downloaded the fullscreen-src-0.98.2-package as I'm runing Processing in version 1.0.9...

15 Dec 2009, 07:50 hansi, @Adam:

If you downloaded the latest package from here you should have gotten a .zip file, when you extract it you should see a folder-structure like this:

just the _entire_ folder and move it to /libraries/

if you still have install-trouble just email me directly!
19 Jan 2010, 04:48 Killian Hi Hansi,

Does the Fullscreen library work with OPENGL renderer? I spent almost two hours on trying to get it working. No way!

Setting screen resolution to 800*600 works fine, but afterwards there's nothing but a damned black screen.

size(aWidth, aHeight, OPENGL);
fs = new FullScreen(this);

Maybe the rendering handle is invalid after changing screen resolution!?

Any suggestions? :-)
Best regards, Killian
19 Jan 2010, 08:45 Hansi, @Killian
Processing version, fullscreen version, operating system, error message... anything???
sorry i need to ask, but my magic skills are kinda low today...
19 Jan 2010, 19:06 Killian Sorry, my bad!

OS: windows vista sp2 64bit
processing: 1.0.7
fullscreen: 0.98

Actually there is no error message. Just a blank black screen.

Usually I code in c++ with opengl, sometimes in pascal & opengl where I always get a handle error when I try to change screen resolution or frame decoration after having initialized OpenGL.

So that's why I got the idea it might be the same problem with !?

Does this help you?
2 Feb 2010, 01:39 sami I'm getting "UnsupportedClassVersionError: A library is using code compiled with an unsupported version of Java"

4 Feb 2010, 20:08 hansi @sami

my bad, i had exported for java6 and you are apparently on java5.
i re-uploaded it!
5 Mar 2010, 12:45 antoine Hi, just downloaded the lib, and still getting the UnsupportedClassVersionError error... (MacOSX)
Did you re-export to java 6 by any chance and by mistake ?

This version of Processing only supports libraries and JAR files compiled for Java 1.5.
A library used by this sketch was compiled for Java 1.6 or later,
and needs to be recompiled to be compatible with Java 1.5.
Exception in thread "Animation Thread" java.lang.UnsupportedClassVersionError: Bad version number in .class file
5 Mar 2010, 13:34 antoine Me again,

The "" that appears under "all versions" works fine.

But the "" that gets downloaded when "Downloald me now !" or "" is pressed does not : compiled under java6.

Thanks !
11 Mar 2010, 15:42 hansi, @antoine

Thanks, glad you figured it out anyways.
Fixed now!

best, h,-
11 Mar 2010, 21:51 Will Is it possible to run one processing sketch fullscreen on one monitor and have another sketch be fullscreen on another monitor?
18 Mar 2010, 20:28 Bill Hsu Thanks for building this! Very useful.

Is there a way to customize the cursor? I usually use cursor(), and it kind of works with the fullscreen API, but the big default arrow cursor flickers in and out.

23 Mar 2010, 04:48 hansi @Will

There's tons of solutions for this (the easiest to create one giant sketch that stretches across both monitors and then using the softfullscreen mode)


I'm sure it's possible to fix this, but i hardly ever change the cursor.
Also I'm not sure it is directly related to this libary... Have you solved this in the mean time?

best, h,-
24 Mar 2010, 17:47 Bill Hsu Hi Hansi, I did a little more research; I'm fairly sure this problem is not related to your library.

I also found a workaround. All the cursor problems go away if I export the sketch to a Java app, and run the Java app instead.

27 Mar 2010, 11:06 marZ Hi Hansi,
just want to say thank you for your fantastic library! I ve been following your post on and finaly thanks to your imput i found the solution to my problem after a whole day of looking .
cheers for this!!!!!
30 Mar 2010, 14:21 sylvain I have this error (linux ubuntu 8.10) when i try to use the opengl rendering (2D) with your library
Exception in thread "Animation Thread" Unable to create OpenGL context
4 Apr 2010, 19:35 Lord_Sonic thank you for this! it works just fine!
5 Apr 2010, 22:16 john open gl support would be very nice... i need it too.
gogogo hansi u make a great job! =)
5 Apr 2010, 22:54 ann How do you include the libjAppleMenuBar.jnilib in eclipse?

see ya, ann
6 Apr 2010, 01:15 hansi, @sylvain: have you checked whether you can run a normal opengl sketch?
that doesn't sound like your problem is caused by this library.

@john: working on it...

@ann: is that you, ann? :) make a folder "lib" and copy the jnilib into it. Then edit your run configuration. Add this to the jvm-parameters:
8 Apr 2010, 12:20 ann Yeah hansi, thanks for the help. yes we are a team, which work on a processing project. we forget to inlcude the *jogl.jnilibs* into the jvm path, now opengl is working with your libs :)
13 Apr 2010, 18:04 thatbrock, Hiya, excellent library, thanks! I do have one question. I'd like to get the app to display only on one of my 2 screens. @JF asked this.

To @JF, you wrote:

yes, you can do something like this:
frame.setLocation( 500, 500 );

It tried this, but still get a black screen on screen 0 (my fullscreen is set to 1). Can you give a short example of this perhaps? Thanks!
(Leopard, P1.1, fs v 0.98.4)
14 Apr 2010, 12:12 hansi @thatbrock:
working on it!
18 Apr 2010, 02:18 cr0ybot Is there a list of "accepted" resolutions? I tried setting my screen size to 768x480 because my monitor has an aspect ratio of 16:10. My output told me "Display mode not supported: 768x480." It did however go into semi-fullscreen, just with a large black frame. I need it to go full-fullscreen, though.

Great job taking the initiative to create such a necessary library, by the way!

22 Apr 2010, 15:39 cr0ybot Apparently you just need to use a resolution that is already present on the computer in the display settings. So never mind my previous comment, except for the "great job" part!
13 May 2010, 21:19 bruno Thanks for this library; it's been useful over and over again.

I have two questions related to OpenGL. I have been using it with SoftFullscreen, and for most cases, it works great, but (1) if I set the OpenGL fog in setup(), the fog won't work unless I call:

gl.glFogf(GL.GL_FOG_START, 550.0f);
gl.glFogf(GL.GL_FOG_END, 950.0f);

in draw() for each frame as well, as if those values were reset by your library. Not a big problem really.

(2) This one is a bit more annoying, still in OpenGL with SoftFullScreen, if I render objects (e.g. using text()) at the right edge of the applet, I get artifacts on the left edge. This is not true the other way around, rendering on the left edge renders fine.

Any idea?
13 May 2010, 21:56 bruno update for previous post:

forget problem (2), after too much time trying to solve it in software, i found out that the screen I was using was not adjusted properly.
26 May 2010, 00:03, Hi there,

Very nice lib! Thanks for providing it! :)

I'm trying to set full screen resolution to the screen.width and screen.height but it doesn't seem to be supported, my sketch just defaults to the sketch size, i.e.

void setup(){
// set size to 640x480
size(640, 480);

// 5 fps

// Create the fullscreen object
fs = new FullScreen(this);

fs.setResolution(screen.width, screen.height);

// enter fullscreen mode

Any suggestions for making this work?
26 May 2010, 12:15 hansi,

as i said in the bug tracker, unfortunately not a bug but a limitation.
26 May 2010, 12:19 hansi @cryobot:
please see lookup the static functions like FullScreen.getResolutions()

have you tried putting the fog-initalizer inside the displayChanged function? like so:

public void displayChanged(){
// init fog here!
27 May 2010, 12:27 Joakn First of all thank you for the library!
I've a problem, I have four screens and when y run the sketch, which size is 1360*4 x 768, it only works in the principal screen... (for a second works in all, but with the window, then only in the nº 1)

The sketch:

import fullscreen.*;

SoftFullScreen fs;

void setup(){
// set size to 640x480
size(1360*4, 768);

// 5 fps

// Create the fullscreen object
fs = new SoftFullScreen(this);

// enter fullscreen mode


28 Jul 2010, 02:38 navax I cant set double screen sample on MAC OSX (10.6.4). Windows 7 works fine.
4 Aug 2010, 01:22 DST, I have a flatscreen with a resolution of 1600 x 900. My sketch is 800 x 600. It scales to match my screen aspect ratio, giving me a 'stretched' app. My nvidia control panel is set to keep aspect ratio: it works for all other programs i've used so far, such as games made with Game Editor.

Is there any way to force aspect ratio on it? Black spaces on the sides would be fine with me.
18 Sep 2010, 02:36 s4l4x, I'm having trouble getting this working under eclipse. I tried the above mentioned VM arguments as well as setting the Native Library folder for the fullscreen.jar. I get an exception no matter what I try:

Exception in thread "Animation Thread" java.lang.NullPointerException
at fullscreen.FullScreen.(

Can someone post a simple example which works under eclipse? Thanks!!
20 Sep 2010, 21:20 s4l4x, Ahh, missed the Warnings & Limitation BELOW the comments!! Must run as an application! Sorry for the noise. Perhaps consider moving Warnings & Limitations above the comments. Thanks!
8 Nov 2010, 21:16 Count Zim Superrr! Danke Hansi.
15 Nov 2010, 16:47 antoine Hi again,
I've got an error when using the SoftFullscreen here, at runtime :

java.lang.UnsatisfiedLinkError: /Users/antoine/Documents/Processing/libraries/fullscreen/library/libjAppleMenuBar.jnilib: no suitable image found. Did find: /Users/antoine/Documents/Processing/libraries/fullscreen/library/libjAppleMenuBar.jnilib: unknown required load command 0x80000022
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(
at java.lang.ClassLoader.loadLibrary(
at java.lang.Runtime.loadLibrary0(
at java.lang.System.loadLibrary(
at japplemenubar.JAppleMenuBar.(
at fullscreen.SoftFullScreen.setFullScreenImpl(
at fullscreen.SoftFullScreen.access$000(
at fullscreen.SoftFullScreen$2.action(
at fullscreen.FullScreenBase$
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at processing.core.PApplet$RegisteredMethods.handle(
at processing.core.PApplet$RegisteredMethods.handle(
at processing.core.PApplet.handleDraw(

Then all calls to the SoftFullScreen object give a:

This is Mac 10.5.8 w/ java 1.5.0_26

Any idea why ?
15 Nov 2010, 19:29 hansi, @antoine
this is fixed for 0.98.5 which is already available on github, i'll release a proper fix asap...
24 Dec 2010, 13:44 Romée Hi Hansi,
BIG BIG Thank's for this, but it doesn't work with me :) ...

here is my sketch, it's a random slide show

Correction: romée by basile

import fullscreen.*;
FullScreen fs;
PImage img;
String[] files;
int timer;
float a ;
int fragNumber;

void setup() {

fs = new FullScreen(this);


float a = random(0,1238);// a est une valeur au hasard comprise entre les deux valeurs données (n'apelle pas tes images "0001" mais "1");
int fragNumber = int (a);//fragNumber est l'arrondi de a (10,55 --> 11)

img = loadImage("pic_" + fragNumber +".jpg");

void draw() {
image(img,650,380);//Si tu veux leur donner à toute une taille commune (les adapter à la fen^tre par ex:
// il te suffit de mettre image(img,0,0,largeur,hauteur);

else if(timer==1)

a = random(0,1238);
int fragNumberPlus=int (a);//fragNumberPlus est l'image qui charge pendant ce temps (une autre épreuve de "a")
img = loadImage("pic_" + fragNumberPlus +".jpg");

delay(10); //this decides how long an image should be displayed

I installed your library well, "fullscreen" appears in "Import libraries" of the processing "skectch" menu.
When I run my sketch, nothing happen for 20 seconds and then:
Java error:

Exception in thread "Thread-13" java.lang.OutOfMemoryError: Java heap space
at antlr.ANTLRStringBuffer.append(
at antlr.CharScanner.append(
at antlr.CharScanner.consume(
at antlr.CharScanner.match(
at antlr.TokenStreamHiddenTokenFilter.consume(
at antlr.TokenStreamCopyingHiddenTokenFilter.consumeFirst(
at antlr.TokenStreamCopyingHiddenTokenFilter.nextToken(
at antlr.TokenBuffer.fill(
at antlr.TokenBuffer.LA(
at antlr.LLkParser.LA(

This is what I got:

Processing 1.1
MacBook 2,26Ghz
2 GO memory
OS X 10.6.5.

Any Clue?

Sorry, very long mail!!!!!

19 Jan 2011, 23:28 Morris I am using dual screens, and am running my sketch in fullscreen. However, since the background turns black, I want to change the location of the sketch (I dont mind the second monitor to be all black). The fullscreen mode automatically centeres the sketch. How can I move the sketch to the left?
19 Jan 2011, 23:30 Morris I am using dual screens, and am running my sketch in fullscreen. However, since the background turns black, I want to change the location of the sketch (I dont mind the second monitor to be all black). The fullscreen mode automatically centeres the sketch. How can I move the sketch to the left?
19 Jan 2011, 23:57 hansi, with a simple solution: unfortunately you can't
with a nasty solution: make your sketch twice as big and paint the right half black
with a proper solution: fetch/fork , then according to what you're using change here: and/or here:
19 Jan 2011, 23:59 hansi, @everyone:
sorry i haven't been maintaining this library very well in the past year. i still find it handy to have this functionality every now and then, but don't really have the time to maintain it well.

if you'd like to fetch/fork/update you're more than welcome.
20 Jan 2011, 15:52 keebOo Hi, using with openGL on mac os x give me this error (dual screen, fullscreen e softfullscreen mode):
Frame buffer is incomplete (GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT) the comments above about OpneGl and lib to add.... but...

anyone could help me?

3 Mar 2011, 17:54 Nick93 I downloaded the file and extracted it to anywhere it's possible, but it doesn't work.

There is always this message:
"Note that release 1.0, libraries must be installed in a folder named 'libraries' inside the 'sketchbook' folder.

Please help me, I become crazy because of this^^

$img = imagecreate( 100, 35 ); $white = imagecolorallocate( $img, 255, 255, 255 ); $black = imagecolorallocate( $img, 0, 0, 0 ); imagefill( $img, $white, 0, 0 ); imagettftext( $img, 22, 0, 15, 35, $black, realpath( "f_bm_neco.ttf" ), $_SESSION["ANTI_SPAM"] ); ob_start(); imagepng( $img ); $content = ob_get_contents(); ob_end_clean(); echo ""; ?>

Warnings & Limitations

  • Only works for applications (not for applets)
  • This size of the sketch can not be scaled to screen size in fullscreen mode
  • Fonts are sometimes corrupted, use this as a workaround.
  • A list of bugs can be found here.

  • The ESC key exists the application, not fullscreen mode
  • It seems not every implementation of Java on Linux gives you proper fullscreen support, you might not be able to switch resolution
  • This package conflicts with processings "present" option


Thanks to for providing a source repository and a big thanks to everybody who sent problems and suggestions to me!

Developers welcome!

If you're interrested in helping develop this api further or you wanna help testing new experimental versions please visit the github project page at You'll also find git access and a wiki there.

My Wish List hansi raber, Last updated: Apr 01, 2014