-
Bug
-
Resolution: Won't Fix
-
P3
-
None
-
1.4.2, 5.0
-
generic, x86
-
generic, windows_2000, windows_xp
Name: ssR10077 Date: 11/18/2003
###@###.###
I've tested on Tiger b28
The following test flickers on Win32 and XAWT but doesn't on Motif
import java.awt.*;
public class FrameFlicker extends Frame {
public static void main(String[] args) {
Frame frame = new FrameFlicker();
frame.setSize(50,50);
frame.setVisible(true);
}
public void paint(Graphics g) {
g.setColor(Color.RED);
Rectangle clip = g.getClipBounds();
g.fillRect(clip.x, clip.y, clip.width, clip.height);
if (getHeight() < 500) {
setSize(getWidth() + 1, getHeight() + 1);
} else {
System.exit(0);
}
}
}
The following test flickers on all toolkits
import java.awt.*;
public class CanvasFlicker extends Canvas {
static Frame frame = new Frame();
public static void main(String[] args) {
frame.add(new CanvasFlicker());
frame.setSize(50,50);
frame.setVisible(true);
}
public void paint(Graphics g) {
g.setColor(Color.RED);
Rectangle clip = g.getClipBounds();
g.fillRect(clip.x, clip.y, clip.width, clip.height);
if (frame.getHeight() < 500) {
frame.setSize(frame.getWidth() + 1, frame.getHeight() + 1);
frame.validate();
} else {
System.exit(0);
}
}
}
======================================================================
###@###.###
I've tested on Tiger b28
The following test flickers on Win32 and XAWT but doesn't on Motif
import java.awt.*;
public class FrameFlicker extends Frame {
public static void main(String[] args) {
Frame frame = new FrameFlicker();
frame.setSize(50,50);
frame.setVisible(true);
}
public void paint(Graphics g) {
g.setColor(Color.RED);
Rectangle clip = g.getClipBounds();
g.fillRect(clip.x, clip.y, clip.width, clip.height);
if (getHeight() < 500) {
setSize(getWidth() + 1, getHeight() + 1);
} else {
System.exit(0);
}
}
}
The following test flickers on all toolkits
import java.awt.*;
public class CanvasFlicker extends Canvas {
static Frame frame = new Frame();
public static void main(String[] args) {
frame.add(new CanvasFlicker());
frame.setSize(50,50);
frame.setVisible(true);
}
public void paint(Graphics g) {
g.setColor(Color.RED);
Rectangle clip = g.getClipBounds();
g.fillRect(clip.x, clip.y, clip.width, clip.height);
if (frame.getHeight() < 500) {
frame.setSize(frame.getWidth() + 1, frame.getHeight() + 1);
frame.validate();
} else {
System.exit(0);
}
}
}
======================================================================
- duplicates
-
JDK-5041482 Using JFrame.setDefaultLookAndFeelDecorated(true) causes the frame to flicker
- Closed
- relates to
-
JDK-5079688 setDefaultLookAndFeelDecorated(true) resize is highly erratic
- Open
-
JDK-4939622 Resizing frame with XAWT causes background to be completely redrawn
- Resolved