-
Bug
-
Resolution: Fixed
-
P4
-
1.0.2
-
b01
-
generic
-
windows_95
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2011424 | 1.2.0 | Dmitri Trembovetski | P4 | Resolved | Fixed | 1.2fcs |
On the Windows platform, size().width returns an incorrect value
if the size of the frame attempts to be resized smaller then the minimum
allowable width. The size is actually reporting the "correct" value, yet
if this value is less than the allowable threshold width, the window is
automatically resized to that minimum (112 width under windows). However,
size does not report that value.
The following test case shows this incorrect behaviour.
The first time the mouse enters, the window should be resized but is
not, and size().width returns 112 which looks about correct. The second
time through size().width incorrectly returns 10.
here's the code:
import java.awt.*;
import java.applet.*;
class testWindowBug extends Applet
{
Window testWin = new Window(null);
public boolean mouseEnter(Event evt, int x, int y)
{
testWin.setBackground(Color.green);
testWin.resize(10,15);
testWin.show();
System.out.println(testWin.size().width);
return true;
}
public boolean mouseExit(Event evt, int x, int y)
{
testWin.hide();
return true;
}
}
- backported by
-
JDK-2011424 size().width after window resize on Windows returns wrong value if < min width
- Resolved