full screen, two displays, no OS menu bar???
in
Integration and Hardware
•
6 months ago
Hi,
I'm trying to run a sketch on two displays:
- one, the laptop monitor
- the second one, a projector
Example: a orange rectangle on the laptop, a blue rectangle on the projector.
I don't need independent frames.
However, when I "Run" the sketch, I get the OS menu bar on the main screen (the laptop).
I've tried to use Present mode with the size of display 1 + display 2,
as told in the wiki:
but doesn't work: Present resizes the sketch.
Any idea?
Perhaps someone has already dealt with this...
Thanks,
Lali
This is the code:
- import java.awt.*;
- import java.util.*;
- int w,h;
- void setup(){
- w=displayWidth+1024;
- h=displayHeight;
- size(w,h);
- }
- void draw(){
- frame.setLocation(0, 0);
- background(100,100,255);
- noStroke();
- fill(255,150,0);
- rect(0,0,displayWidth,displayHeight);
- }
- //----------------------------------------------------------------------------------
- void init() {
- // frame.dispose();
- frame.removeNotify();
- frame.setUndecorated(true);
- frame.setResizable(false); // this doesn't work
- frame.addNotify();
- super.init();
- }
1