🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #10485

Re: Event dispatching/trapping!!!

#10485
From: Eihab Abouzour
Date: Sun, 12 Sep 1999 00:00
28 lines
1475 bytes
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: <7rhfqb$j868@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <37B5B57A.92083B6@magnus.uwaterloo.ca>

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: <7rhfqb$j868@forums.borland.com>
X-Deja-AN: 524264187
References: <37B5B57A.92083B6@magnus.uwaterloo.ca>
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