Article View: borland.public.jbuilder.java.swing
Article #10486Re: Event dispatching/trapping!!!
From: Eihab Abouzour
Date: Sun, 12 Sep 1999 00:00
Date: Sun, 12 Sep 1999 00:00
33 lines
1677 bytes
1677 bytes
h
Eihab Abouzour <eaabouzo@magnus.uwaterloo.ca> wrote in message
news:7rhfqb$j868@forums.borland.com...
>
> EA. <eaabouzo@magnus.uwaterloo.ca> wrote in message
> news:37B5B57A.92083B6@magnus.uwaterloo.ca...
> >
> > Hi.. I have a problem with this piece of code:
> > (nodeTF is just a TextField)
> >
> > void jButton1_actionPerformed(ActionEvent e) {
> >
> > long eventTime = (new java.util.Date()).getTime();
> > int keyCode = KeyEvent.VK_UNDEFINED;
> > KeyEvent keyReleasedEvent = new KeyEvent(this,
> > KeyEvent.KEY_PRESSED, eventTime,
> > keyCode, KeyEvent.VK_0);
> > ActionEvent ae = new
> > ActionEvent(this,ActionEvent.ACTION_PERFORMED,"asd");
> > nodeTF.requestFocus();
> > nodeTF.dispatchEvent(keyReleasedEvent);
> > nodeTF.dispatchEvent(ae);
> >
> > }
> >
> > Problem: I can dispatch AND trap "KeyEvent" but something is WRONG with
> > "ActionEvent"! I don't know if the problem is dispatching and/or
> > trapping the "ActionEvent"?!!
> >
> > Thanks for you help!!!!!
> >
>
>
Technical Details
Message-ID:
<7rhgdv$j8814@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<37B5B57A.92083B6@magnus.uwaterloo.ca> <7rhfqb$j868@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,50b96ba3decc97e2 X-Google-Attributes: gid111d45,public From: "Eihab Abouzour" <eaabouzo@magnus.uwaterloo.ca> Subject: Re: Event dispatching/trapping!!! Date: 1999/09/12 Message-ID: <7rhgdv$j8814@forums.borland.com> X-Deja-AN: 524264188 References: <37B5B57A.92083B6@magnus.uwaterloo.ca> <7rhfqb$j868@forums.borland.com> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Organization: Another Netscape Collabra Server User X-MSMail-Priority: Normal Newsgroups: borland.public.jbuilder.java.swing