-
Bug
-
Resolution: Fixed
-
P3
-
6
-
None
-
beta
-
generic
-
generic
-
Verified
The spec of GraphicsDevice.setFullScreenWindow is silent about the method behavior when other window is in full-screen mode already. The spec states: "Windows cannot overlap the full-screen window." However calling this method for other (non full-screen) window returns current full-screen window to windowed mode and enters the second one to full-screen instead. This behavior is not described in the spec.
Code below illustrates current behavior: it shows initially blue full-screen window and then yellow one (blue is returned to windowd mode):
=================== Test44.java ===========================
import java.awt.*;
public class Test44 {
public static void main(String[] argv) {
Test44 t = new Test44();
t.go();
}
public void go() {
GraphicsDevice gd = GraphicsEnvironment.
getLocalGraphicsEnvironment().
getDefaultScreenDevice();
Window w1 = new Window(new Frame("one"));
w1.setSize(200, 200);
w1.setBackground(Color.blue);
gd.setFullScreenWindow(w1);
try {
Thread.sleep(3000);
} catch (InterruptedException ie) {
}
Window w2 = new Window(new Frame("two"));
w2.setBackground(Color.yellow);
gd.setFullScreenWindow(w2);
try {
Thread.sleep(3000);
} catch (InterruptedException ie) {
}
System.exit(0);
}
}
==========================================
###@###.### 2004-12-10 13:44:56 GMT
Code below illustrates current behavior: it shows initially blue full-screen window and then yellow one (blue is returned to windowd mode):
=================== Test44.java ===========================
import java.awt.*;
public class Test44 {
public static void main(String[] argv) {
Test44 t = new Test44();
t.go();
}
public void go() {
GraphicsDevice gd = GraphicsEnvironment.
getLocalGraphicsEnvironment().
getDefaultScreenDevice();
Window w1 = new Window(new Frame("one"));
w1.setSize(200, 200);
w1.setBackground(Color.blue);
gd.setFullScreenWindow(w1);
try {
Thread.sleep(3000);
} catch (InterruptedException ie) {
}
Window w2 = new Window(new Frame("two"));
w2.setBackground(Color.yellow);
gd.setFullScreenWindow(w2);
try {
Thread.sleep(3000);
} catch (InterruptedException ie) {
}
System.exit(0);
}
}
==========================================
###@###.### 2004-12-10 13:44:56 GMT