Author Topic:   AWT
shan
unregistered
posted March 09, 2000 02:22 PM           
How will I know which component has the focus or the cursor ????

maha anna
bartender
posted March 09, 2000 03:22 PM             
Assuming e is the ref to the Event caught,

Component source = (Component)e.getSource();
String sourceName = source.getName();
System.out.println(sourceName);

You may have to use this code appropriately in Focus listener methods.
regds
maha anna

[This message has been edited by maha anna (edited March 09, 2000).]

|