This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
EventDispatcher now creates events like this: MouseEvent event = new MouseEvent(component, id, 0, mods, x, y, clickCount, popup); KeyEvent event = new KeyEvent(component, id, 0, mods, keyCode); 0 stands for timestamp. But IDE has its own double-click detection where it checks time difference between single clicks and if time difference is less than a constant, it assumes it is a double-click. It makes some tests to fail. It would be better to create events with proper timestamp: 390: MouseEvent event = new MouseEvent(component, id, System.currentTimeMillis(), mods, x, y, clickCount, popup); 427: KeyEvent event = new KeyEvent(component, id, System.currentTimeMillis(), mods, keyCode); 440: KeyEvent event = new KeyEvent(component, id, System.currentTimeMillis(), mods, keyCode, keyChar);
Just like Jiri said: System.currentTimeMillis() instead of 0 as timestamp.
390c390,391 < MouseEvent event = new MouseEvent(component, id, 0, mods, x, y, clickCount, popup); --- > MouseEvent event = new MouseEvent(component, id, System.currentTimeMillis(), > mods, x, y, clickCount, popup); 427c428,429 < KeyEvent event = new KeyEvent(component, id, 0, mods, keyCode); --- > KeyEvent event = new KeyEvent(component, id, System.currentTimeMillis() > , mods, keyCode); 440c442,443 < KeyEvent event = new KeyEvent(component, id, 0, mods, keyCode, keyChar); --- > KeyEvent event = new KeyEvent(component, id, System.currentTimeMillis(), > mods, keyCode, keyChar);
Verified.