http://GameProgrammer.Com

Programming

GP Mailing List
     Thread Index
     Date Index

ATXGPSIG List
     Thread Index
     Date Index

Google
>

Home

Wise2Food



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: java



It should be possible. As far as I recall, you should use public boolean
action(Event evt, Object obj). This method receives the <return> key
presses. In the method you then have to check evt.target to see in which
component the key was pressed. Ex.:

public boolean(Event evt, Object obj)
{
	if (event.target == varTextField)
		doSomething()

	return true;
}

It's very strange but <return> key presses are not send to the keyup and
keydown-methods. Hope this helps.

Claus Pedersen


-----Original Message-----
From: gameprogrammer-owner@gameprogrammer.com
[mailto:gameprogrammer-owner@gameprogrammer.com]On Behalf Of Eudoxus3
Sent: 7. september 1999 22:13
To: Game programmer
Subject: java


Would anyone happen to know how to get Java 1.0.2 responding to things
like <return> key presses in AWT components such as TextField's and
TextArea's?  Iv'e looked all the way through the JDK documentation (yes,
ALL of it!!!) and the only time I seem able to do it is using listeners in
1.1.  This is ok and easy but I /really/ need serious backwards
compatibility here.

Why do I have a nasty feeling it's not possible and that I'm going to have
to write a lengthy Thread just to check the contents of the text area?..


Regards,

Matt. W.
--
      ***   eudoxus@freeuk.com   ***
***   http://www.eudoxus.freeuk.com/   ***
mwebster@apsoft.co.uk   http://members.xoom.com/eudoxusM/

=================================================================
To SUBSCRIBE or UNSUBSCRIBE please visit
http://gameprogrammer.com/mailinglist.html

=================================================================
To SUBSCRIBE or UNSUBSCRIBE please visit
http://gameprogrammer.com/mailinglist.html



  • Follow-Ups:
    • RE: java
      • From: Eudoxus3 <Eudoxus@freeuk.com>
  • References:
    • java
      • From: Eudoxus3 <Eudoxus@freeuk.com>