Here is what I remember of the mouse event generation.

1.  First a mousePress event is generated on a button press.  

Here is where I check if it is a right button press or not and do the popup. 
Within the popup it will collect the information from from the selection area
thus the columns and rows displaying on the popup.

2. Second a mouseRelease event is generated on a release of the button.

I do nothing in this method.

3.  mouseClick is generated if a mouse button is clicked.

For me a click is fast press and release of the button and I think controlled by
the operating system as whether to generate a click event or not.  How java
handles this am not sure.

Also in the mouseClick method is where I do a reposition of the cursor and
checking for hot spot hits.

Now in swing they check for press and release of a graphic button but since we
really do not have real buttons but pseudo buttons I did not do it that way.

It seems to me that it is in the mouse handler because it does not disappear
until after the button is released as Marc was reporting.  Thus generating a
mouseClick in 5.0 as well.

This would explain what Patrick is seeing.  I could be wrong though.

If I were debugging this that is where I would start.  Stick some
System.out.println's in there to see what events are being generating for when
and what order.

If there is a mouseClick being generated then am pretty sure that is the
problem.  Stick a break point in there on those methods to check it after
drawing the rectangle and before hitting the right mouse button.

This is only my opinion and could be totally off.

Kenneth


Quoting Patrick Bielen <[EMAIL PROTECTED]>:

> Hi Wim,
>  
> > just did some tests with the selection rectangle on a 1.5 installation. 
> > The right click seems to be OK most of the times. Sometimes however 
> > the right-click repositions the cursor. In that case the rectangle 
> > disappears as it should. I can not however reproduce when the cursor 
> > reposition on right-click. It just sometimes does so. 
>  
> Indeed, same thing here.
> And indeed, when cursor moves, the rubber band disapears.
> While a right-click should not move the cursor.
>  
> Met vriendelijke groeten,
> Best Regards,
>  
> Patrick Bielen
>  
> System-Administrator Stafa Holland BV
> Microsoft Certified Professional
> Sun Certified Java Programmer
> 
> 






-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Tn5250j-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tn5250j-general

Reply via email to