Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6430553
Votes 0
Synopsis MouseClick event should not be fired if MouseRelease happened without MousePress
Category java:classes_awt
Reported Against
Release Fixed 7(b27)
State 10-Fix Delivered, bug
Priority: 4-Low
Related Bugs 6746212 , 4955581
Submit Date 25-MAY-2006
Description
J2SE Version (please include all output from java -version flag):
  java version "1.6.0-beta2"
  Java(TM) SE Runtime Environment (build 1.6.0-beta2-b82)
  Java HotSpot(TM) Client VM (build 1.6.0-beta2-b82, mixed mode, sharing)
 
Does this problem occur on J2SE 1.4.x or 5.0.x ?  Yes / No (pick one)
 yes

Operating System Configuration Information (be specific):
 Windows XP Professional SP2

Hardware Configuration Information (be specific):
  customer  Pentium  customer , 730 Mhz, 384 Mb RAM

Bug Description:
 An empty JFrame is created, and a key listener added to it.
 When asked if it is focusable, it retuns true, when asked if
 it holds the focus it returns false. However, it receives
 key events. It returns false also if it is explicitly told
 to own the focus.

Steps to Reproduce (be specific):

 Compile and run the attached program. When its window appears,
 hit a key (e.g. "a"). This is the output:

W:\borsotti\jtest>java Focus
focus: false true
key typedjava.awt.event.KeyEvent[KEY_TYPED,keyCode=0,keyText=Unknown
keyCode: 0x
0,keyChar='a',keyLocation=KEY_LOCATION_UNKNOWN]
Posted Date : 2006-05-25 17:30:53.0

J2SE Version (please include all output from java -version flag):
  java version "1.6.0-beta2"
  Java(TM) SE Runtime Environment (build 1.6.0-beta2-b82)
  Java HotSpot(TM) Client VM (build 1.6.0-beta2-b82, mixed mode, sharing)

Does this problem occur on J2SE 1.4.x or 5.0.x ?  Yes / No (pick one)
  Yes

Operating System Configuration Information (be specific):
  Windows XP Professional SP2

Hardware Configuration Information (be specific):
 Intel Pentium III, 730 Mhz, 384 Mb RAM

Bug Description:
 A JPanel contains a window listener that uses the Robot
 to fire a mouse release event when the window is deactivated.
 The Robot fires a mouse release event and a (spurious) mouse
 click event.

Steps to Reproduce (be specific):
 Compile and run the attached program. Place the mouse pointer
 in its window. Then press alt-tab to change the active window.
 The result is:

......
keypress
keyrelease
windowDeactivated
released: 117 159 1
clicked: 117 159 1
Posted Date : 2006-05-25 17:30:53.0
Work Around
N/A
Evaluation
awt_Component does nothing to track if RELEASE followed by PRESS while sending CLICKED event. But simple and obvious fix may have a hidden fault in the case of two windows. For now we have no standarts for that case. So if we about to fix it then should also note 4955581.
Posted Date : 2006-05-26 14:54:32.0

Actually if the pointer stays above the java window after pressing Alt+TAB we have to get MouseReleased event. Othervise, if java window becomes covered by some other window after Alt+TAB MouseReleased shouldn't come. This is what we now observe.
The problem is in extra MouseClicked event.
Posted Date : 2007-05-22 08:59:16.0

Will be handled together with 4955581.
Posted Date : 2007-05-22 11:34:21.0

By keeping a state mask if a previous PressedEvent had actually happen we may track the situations when CLICK shouldn't occur and block it from posting into the event queue.
Posted Date : 2007-10-26 15:05:48.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang