When running the following program, the window instance disappears as soon
as its move method is sent. If I explictly do a show after the move, the window will
reappear.
import java.awt.*;
class win {
public static void main(String argv[]) {
Frame f = new Frame();
Window w = new Window(f);
w.resize(100,100);
f.resize(200,200);
f.show();
w.show();
while (true) {
for (int y = 0; y < 100; y++) {
for (int x = 0; x < 100; x++) {
w.move(x, y);
}
}
}
}
}
as its move method is sent. If I explictly do a show after the move, the window will
reappear.
import java.awt.*;
class win {
public static void main(String argv[]) {
Frame f = new Frame();
Window w = new Window(f);
w.resize(100,100);
f.resize(200,200);
f.show();
w.show();
while (true) {
for (int y = 0; y < 100; y++) {
for (int x = 0; x < 100; x++) {
w.move(x, y);
}
}
}
}
}
- duplicates
-
JDK-4019045 Moving an Window instance causes it to disappear
- Closed