-
Bug
-
Resolution: Won't Fix
-
P3
-
6u14
-
x86
-
linux_ubuntu
When a resizable frame is made non-resizable, the frame repositions itself, but the title bar do not get repainted leaving painting artifacts on screen. When a frame is repeatedly made resizable and non-resizable, the frame moves down.
To reproduce, run the below test. Repeatedly click on 'Resizable' checkbox.
This is reproducible with Ubuntu 8.04
import java.awt.*;
import java.awt.event.*;
public class Test {
public static void main(String[] args) {
final Frame f = new Frame();
f.setSize(100, 100);
f.setLayout(new FlowLayout());
Checkbox cb = new Checkbox("Resizable", true);
cb.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent event) {
if (event.getStateChange() == ItemEvent.SELECTED) {
f.setResizable(true);
} else {
f.setResizable(false);
}
}
});
f.add(cb);
f.setVisible(true);
}
}
To reproduce, run the below test. Repeatedly click on 'Resizable' checkbox.
This is reproducible with Ubuntu 8.04
import java.awt.*;
import java.awt.event.*;
public class Test {
public static void main(String[] args) {
final Frame f = new Frame();
f.setSize(100, 100);
f.setLayout(new FlowLayout());
Checkbox cb = new Checkbox("Resizable", true);
cb.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent event) {
if (event.getStateChange() == ItemEvent.SELECTED) {
f.setResizable(true);
} else {
f.setResizable(false);
}
}
});
f.add(cb);
f.setVisible(true);
}
}
- relates to
-
JDK-6522731 Location of the frame changes,when the frame is resized & non-resized.
-
- Closed
-