-
Bug
-
Resolution: Unresolved
-
P3
-
7
-
x86
-
os_x
FULL PRODUCT VERSION :
1.7.0_04-b21
ADDITIONAL OS VERSION INFORMATION :
Mac OSX 10.7.4
A DESCRIPTION OF THE PROBLEM :
When you create a java.awt.Window and override paint it doesn't draw correctly unless the window height is at least 8px high.
REGRESSION. Last worked in version 6u31
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile and run this test class
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
On Java6 for mac (and java6 and java7 for windows) the result is a blue line (window) with 300px width and 3px height.
ACTUAL -
On Java7 for mac the result is a 300x3 window with some blue and some garbage pixels.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public class TestWindowForMacJava7 {
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
Frame f = new Frame();
f.setLocation(0, 0);
f.setSize(0, 0);
f.setUndecorated(true);
f.setVisible(true);
Window w = new Window(f) {
public void paint(Graphics g) {
g.setColor(Color.BLUE);
g.fillRect(0, 0, getWidth(), getHeight());
}
};
w.setLocation(100, 100);
w.setSize(300, 3);
w.setAlwaysOnTop(true);
w.setVisible(true);
}
});
}
}
---------- END SOURCE ----------
1.7.0_04-b21
ADDITIONAL OS VERSION INFORMATION :
Mac OSX 10.7.4
A DESCRIPTION OF THE PROBLEM :
When you create a java.awt.Window and override paint it doesn't draw correctly unless the window height is at least 8px high.
REGRESSION. Last worked in version 6u31
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile and run this test class
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
On Java6 for mac (and java6 and java7 for windows) the result is a blue line (window) with 300px width and 3px height.
ACTUAL -
On Java7 for mac the result is a 300x3 window with some blue and some garbage pixels.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public class TestWindowForMacJava7 {
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
Frame f = new Frame();
f.setLocation(0, 0);
f.setSize(0, 0);
f.setUndecorated(true);
f.setVisible(true);
Window w = new Window(f) {
public void paint(Graphics g) {
g.setColor(Color.BLUE);
g.fillRect(0, 0, getWidth(), getHeight());
}
};
w.setLocation(100, 100);
w.setSize(300, 3);
w.setAlwaysOnTop(true);
w.setVisible(true);
}
});
}
}
---------- END SOURCE ----------