|
||
|
GP Mailing List
ATXGPSIG List
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] RE: java
It sounds a bit strange. The following code should work:
public boolean action(Event evt, Object obj)
{
if (event.target == varTextField)
doSomething()
return true;
}
The only thing I can think of - and it's something that happened to me once
- is that maybe there's a repaint you're not noticing which gives the
impression that the event isn't being captured properly. But that's
probably a long shot.
I suggest paring down your code until you've distilled the smallest
non-working program, then maybe post that to the list so that we can have a
better look. Unfortunately, the earliest jdk I have installed on my machine
is 1.1.7B, so I may not actually be able to test easily.
Alternatively, check out the forum archives at the Javasoft website.
They're excellent.
Patrick.
>From: Eudoxus3 <Eudoxus@freeuk.com>
>Reply-To: gameprogrammer@gameprogrammer.com
>To: Game programmer <gameprogrammer@gameprogrammer.com>
>Subject: RE: java
>Date: Wed, 8 Sep 1999 09:01:15 +0100 (BST)
>
>On Tue 07 Sep, Claus B. Pedersen wrote:
> > 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;
> > }
>Yeah, I tried this last night, but it didn't do anything.
>
>
>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
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
=================================================================
To SUBSCRIBE or UNSUBSCRIBE please visit
http://gameprogrammer.com/mailinglist.html
|
|