<AWT Dev> RFC: KeyboardFocusManager patch

Roman Kennke roman.kennke at aicas.com
Thu Jun 21 09:40:27 PDT 2007


Hi Anton,

> > I think both approaches are fine and have more or less the same effect.
> > The 1st throws the exception a little earlier. If the reasoning is to
> > notify the implementor that there's something missing, this might be
> > better because it will pop up even in the smallest HelloWorld example.
> > But I guess there will be some initial focus setup on any window, so
> > this is not really an argument. Why do you think the 2nd is preferable?
> > 
> 
> Just because it leaves the implementor a chance not to do additional
> work he probably doesn't want to. Say, if he believes he will live without
> focus at all (a custom headless toolkit, or kbd-less devises etc.).
> Not very useful, of course, but theoretically possible.

Not really. When we throw an exception from the DummyKFMPeer, then the
application will not come up properly. This is why I started this in the
first place (ok, I got an NPE instead of some other execption, but that
doesn't really matter). My reasoning with the DummyKFMPeer was indeed to
leave this open (yes, some apps can indeed live without focus). It could
be a good idea then to issue a warning only, rather than throwing an
exception from the DummyKFMPeer methods.

/Roman

-- 
Dipl.-Inform. (FH) Roman Kennke, Software Engineer, http://kennke.org
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-0
USt-Id: DE216375633, Handelsregister HRB 109481, AG Karlsruhe
Geschäftsführer: Dr. James J. Hunt




More information about the awt-dev mailing list