Thanks, Jeanette.

I was also going to mention #4302322 also. Sun has an annoying habit of
making some bug reports private. I had to twist some arms to make mine
public.

BTW, I have also seen your proposed solution to the problem. I think it is a
very good one. I hope the Swing team looks into it. If I remember correctly
about how the Swing source works, the button UI delegate (or any UI
delegate) processes a mouse event BEFORE it checks to see whether an
InputVerifier has vetoed the transfer of focus. The mouse event gets
partially processed (e.g. the button appears in a pressed state) before the
UI delegate checks to see whether an InputVefifier has vetoed the transfer
of focus. It seems to me that the UI delegate should first check whether an
InputVerifier has vetoed the transfer of focus before it begins to process
the mouse event.

Best,

pf

-----Original Message-----
From: Kleopatra
To: Farwell, Paul
Cc: '[EMAIL PROTECTED]'
Sent: 1/5/02 6:49 AM
Subject: Re: Bug in InputVerifier



"Farwell, Paul" schrieb:
> 
> If your UI uses the InputVerifier introduced with JDK 1.3, you might
want to
> vote for a bug recently made public on Sun's BugParade. I'm hoping we
can
> convince Sun to go the 'extra step' and make the InputVerifier truly
useful.
> 

Good idea, Paul! My votes are on the related #4302322 which is not
available on the bug parade at the moment and has an incorrect
evaluation on part of the swing engineer (attributing it to an awt focus
issue). But on that vote was a very good analysis on what's going wrong
- based on that info I set up an example fix at (not sure if it covers
every issue):

http://www.mycgiserver.com/~Kleopatra/swing/button/buttonverify.html

> 
> This is the more fundamental problem:
> 
> http://developer.java.sun.com/developer/bugParade/bugs/4533820.html
> 
>   "Extend InputVerifiers to keep events from firing on target
components"
> 

Unfortunately that's an RFE, they seldom get fixed...

> This is a more specific problem:
> 
> http://developer.java.sun.com/developer/bugParade/bugs/4368790.html
> 
>   "JButton stays pressed when focus stolen"

Thanks for that link, I had not been aware of it until now. I'll check
my fix against it one of these days (though at first glance the
evalutation seems to be on the wrong track again...)

Have a nice weekend
Jeanette
_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing

Reply via email to