For a long time, I've been able to create full-screen applications with the typical
frame.setUndecorated(true) call and then relocating the frame to the top left corner of the screen with
frame.setLocation(0, 0). However, I've always had to relocate the frame in the first frame of draw, otherwise it would fail to work.
I recently discovered that other people do not have this problem in the thread "Present" (full-screen mode) stretched across Multiple Screens, but it was rather distracting from the original problem, so I have come to write this post.
I'm running Windows 7 64 bit with both Processing 1.5.1 and 2.0a7.
From the thread above, the following code is supposed to work, although it doesn't:
I always end up using something like this:
Note that both of these pieces of code are written for Processing 2.0a7; for Processing 1.5.1 users, you will have to change displayWidth and displayHeight to screenWidth and screenHeight, respectfully.
At any rate, I am able to produce full screen applications. I'm just wondering why I am encountering this problem, if anyone else is in the same boat, and if there is a reason why and / or a solution.
I recently discovered that other people do not have this problem in the thread "Present" (full-screen mode) stretched across Multiple Screens, but it was rather distracting from the original problem, so I have come to write this post.
I'm running Windows 7 64 bit with both Processing 1.5.1 and 2.0a7.
From the thread above, the following code is supposed to work, although it doesn't:
- public void init() {
- frame.removeNotify();
- frame.setUndecorated(true);
- frame.addNotify();
- super.init();
- }
- void setup() {
- size(displayWidth, displayHeight);
- frame.setLocation(0, 0); //This does not work
- }
- void draw() {
- println(millis());
- }
I always end up using something like this:
- void setup() {
- size(displayWidth, displayHeight);
- frame.setLocation(0, 0); //This doesn't work
- }
- public void init() {
- frame.removeNotify();
- frame.setUndecorated(true);
- frame.addNotify();
- super.init();
- }
- void draw() {
- if(frameCount == 1) frame.setLocation(0, 0); //This does
- println(millis());
- }
Note that both of these pieces of code are written for Processing 2.0a7; for Processing 1.5.1 users, you will have to change displayWidth and displayHeight to screenWidth and screenHeight, respectfully.
At any rate, I am able to produce full screen applications. I'm just wondering why I am encountering this problem, if anyone else is in the same boat, and if there is a reason why and / or a solution.