-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.1
-
None
-
x86
-
windows_95
Name: mc57594 Date: 02/17/97
In many applications the programer wants to restrict focus
change until a certain circumstance is met. For example
a given control might be "required". The program should
then thwart all attempts by the user to leave that control
without actually entering some data. This is very difficult
to program in JAVA.
The leaving focus event is called too frequently to be
of much use, and the reason for the call is unknown. For
example a leaving focus event is generated when the user
clicks on another application. the permanent/temporary
flag is insufficiently fine to detect the reason.
So one is forced to use the gaining focus event. But it
is not possible to consume that event. The best we can
do is request focus back on the original component. This
causes two more events to fire, which our code must know
to skip.
The code to implement this requirement is therefore a
complicated mess global data - to remember the component
from whence we came and to know to ingore certain events
when switching back. Definitely not object-oriented!
company - Prolifics, a JYACC company , email - ###@###.###
======================================================================
- duplicates
-
JDK-4223738 Need way to truly veto loss of focus (vs. simply regain it in focusLost method)
-
- Closed
-