Passing data with own AWT events - what would be the best way?
From: A. Farber (Alexander.Farber_at_t-online.de)
Date: 02/27/04
- Next message: Marco Schmidt: "Re: Passing data with own AWT events - what would be the best way?"
- Previous message: ak: "Re: Using JViewport for an overview+detail map"
- Next in thread: Marco Schmidt: "Re: Passing data with own AWT events - what would be the best way?"
- Reply: Marco Schmidt: "Re: Passing data with own AWT events - what would be the best way?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 27 Feb 2004 04:37:17 -0800
Hi,
I have 2 own components in my card game applet:
http://pref.dyndns.org/pref3/pref3.html (JDK 1.1)
One is managing playing cards on a table and the
other is not visible and is managing network
connection to the server. Both components post
AWT action events to the applet using smth. like:
actionListener.actionPerformed(new ActionEvent
(this, ActionEvent.ACTION_PERFORMED, "address"));
My problem is though, that sometimes I need to pass
not just a string (like "address" above) with an
event, but more information, like a player number or
several cards she selected. Of course I could convert
that information into a string and then parse it
back at the listening side, but I wonder if there
is a better way?
Is it for example possible to create an AWT event which
would have an Integer and not a String as the argument?
Also an additional question: do I need to add() my
invisible network component to the applet or would
myComp.addActionListener(this); in the applet suffice?
Thanks
Alex
- Next message: Marco Schmidt: "Re: Passing data with own AWT events - what would be the best way?"
- Previous message: ak: "Re: Using JViewport for an overview+detail map"
- Next in thread: Marco Schmidt: "Re: Passing data with own AWT events - what would be the best way?"
- Reply: Marco Schmidt: "Re: Passing data with own AWT events - what would be the best way?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|