JDK-4022670 : Ambiguous key events are sent to application on TextComponent/TextFiled/TextArea
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.1
  • Priority: P4
  • Status: Closed
  • Resolution: Not an Issue
  • OS: solaris_2.5.1
  • CPU: generic
  • Submitted: 1996-12-18
  • Updated: 1998-05-21
  • Resolved: 1998-05-21
Related Reports
Relates :  
Description
All of key events are sent to applications on Text components(TextComponent/
TextFiled/TextArea) without consuming those in text conponents. Application
now can get all key events when key listener is implemented.
Since text components get key events and dispatch text event instead,
text components should consume all of key event. Those shouldn't be sent to applications. This action confuses programmer.

I attached a sample program which gets KeyEvent on the TextField
and print its event type on the command line if it can be.

On runing a sample program, it can get all of key events
when a key is pressed and released. Since TextField dispatchs text events
instead as key input events, keyevent should be consumed and not sent to
its subclass. 

Comments
EVALUATION [aim 1/14/97] The description in this bug report is much too vague - I do not at all understand what the problem is. If you wish something to be done on this bug, please provide more detail on the problem (preferably with sample code which displays the problem). [koji 1/28/95] I updated bug report. please review it. Name: rrT76497 Date: 05/21/98 ECJohn/SIPtech May 18,98This does not seems to be a bug. In the attached code the bug submitter implements a key listener. So it is natural for events to go to this key event interested object and back to the peer.[since boolean consume is kept false otherwise] .Anyway TextEvent does not consume any keyevents. If a TextEvent happens ie a change on the data in the field, that wo'nt go back to the peer.[since in AWTEvent constructor for textevent consume=true] ======================================================================
11-06-2004

WORK AROUND
11-06-2004

SUGGESTED FIX
11-06-2004

PUBLIC COMMENTS
10-06-2004