[4972] in java-interest
handling event key press in textfield
daemon@ATHENA.MIT.EDU (Paul.Bohnenkamp@corp.sun.com)
Wed Jan 24 21:12:58 1996
From: Paul.Bohnenkamp@corp.sun.com
Date: Wed, 24 Jan 1996 16:16:28 -0800
To: java-interest-digest@java.Eng.Sun.COM
I've got an array of checkboxes, boxes[i], that correspond to an array of textfields,fields[i]. If two key presses happen in a textfield I need to set the state of the corresponding checkbox to true. Can someone explain how I'd use handleEvent(Event e) to make this happen?
I figured out I have to check (e.target instanceof TextField) but can't figure out how to tell which field[i] is being operated on?
Here's the e.toString I'm echoing:
java.awt.Event[id=1004,x=116,y=0,target=java.awt.TextField[0,0,238x28,text=,editable,selection=0-0]]
thx,
Paul
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com