-
Bug
-
Resolution: Fixed
-
P4
-
1.1.5
-
b01
-
x86
-
windows_nt
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2018091 | 1.2.0 | Fred Ecks | P4 | Resolved | Fixed | 1.2beta4 |
Name: chT40241 Date: 11/25/97
The MOUSE_ENTERED events on a Frame contain incorrect x and y values
when entering from the top or slowly entering the sides.
Also, the coordinates for enter and exit do not match when entering and
exiting at the same point.
JDK 1.1.5J, Windows NT 4.0 SP3
*** test2.java ***
import java.awt.*;
import java.awt.event.*;
// The MOUSE_ENTERED events on a Frame contain incorrect x and y values
//when entering from the top or slowly entering the sides.
// Also, the coordinates for enter and exit do not match when entering and
// exiting at the same point.
// JDK 1.1.5J, Windows NT 4.0 SP3
public class test2 {
public static void main(String[] args) {
System.out.println("Move the mouse so that the cursor enters the\n" +
"frame from the top. Notice bogus coordinates for the ENTERED\n" +
"event. Also, when entering and exiting at the same point, the\n" +
"coordianates for the ENTERED and EXITED events don't match.\n" +
"This bug also occurs when entering other sides of the frame\n" +
"very slowly.");
Frame f = new Frame("test");
f.setLayout(null);
f.setBounds(100, 100, 200, 200);
MouseAdapter ma = new MouseAdapter() {
public void mouseEntered(MouseEvent e) {
System.out.println(e);
// simple test to draw attention to bug
if (e.getX() < 0 || e.getX() > 1500)
System.out.println("***ERROR*** x coordinate is probably bog
us.");
}
public void mouseExited(MouseEvent e) {
System.out.println(e);
}
};
f.addMouseListener(ma);
f.show();
}
}
======================================================================
- backported by
-
JDK-2018091 MOUSE_ENTERED coordinates incorrect for a java.awt.Frame
- Resolved