Re: Using implements Runnable and MouseListener

From: hiwa (HGA03630_at_nifty.ne.jp)
Date: 02/08/04


Date: 7 Feb 2004 16:46:56 -0800


"Doug van Vianen" <courses@shaw.ca> wrote in message news:<hZaVb.416128$JQ1.297480@pd7tw1no>...
> I am fairly new to Java but have written an applet that uses 'implements
> Runnable' to do some timing
> eg
> public class Puzzle extends Applet implements Runnable
> { etc.
>
> and also an applet which detects left, right and double mouse clicks using
> 'implements MouseListener'
> eg
> public class TestMouse extends Applet implements
> MouseListner { etc.
>
> I would now like to write an applet that uses both of these so that I can
> detect the mouse actions as well as do some timing.
>
> Could someone show me the structure that would be used to allow both
> implements Runnable and MouseListener in the same Java applet? This is
> probably quite obvious to a regular Java programmer but I am an old style
> programmer trying to convert to Java.
>
> Thank you.
> Doug van Vianen
> courses@shaw.ca

The most typically, timing thread, which is your runnable, does some
sleep() and call applet's repaint() -- that is it is a controller for
some animation. MouseListener will do whatever it likes in its various
methods.



Relevant Pages

  • Using implements Runnable and MouseListener
    ... I am fairly new to Java but have written an applet that uses 'implements ... detect the mouse actions as well as do some timing. ... implements Runnable and MouseListener in the same Java applet? ...
    (comp.lang.java)
  • Re: Using implements Runnable and MouseListener
    ... > and also an applet which detects left, ... > I can detect the mouse actions as well as do some timing. ... > implements Runnable and MouseListener in the same Java applet? ...
    (comp.lang.java)
  • Technical information about the vulnerabilities fixed by MS-02-52
    ... The patch doesn't fix all of the vulnerabilities we reported, ... Java support in the Internet Zone even after applying the patch gives the ... possibility for a malicious Java Applet to gain control over the system. ... Our original report and information regarding the remaining Java ...
    (NT-Bugtraq)
  • Technical information about the vulnerabilities fixed by MS-02-52
    ... The patch doesn't fix all of the vulnerabilities we reported, ... Java support in the Internet Zone even after applying the patch gives the ... possibility for a malicious Java Applet to gain control over the system. ... Our original report and information regarding the remaining Java ...
    (Bugtraq)
  • [Full-Disclosure] Technical information about the vulnerabilities fixed by MS-02-52
    ... The patch doesn't fix all of the vulnerabilities we reported, ... Java support in the Internet Zone even after applying the patch gives the ... possibility for a malicious Java Applet to gain control over the system. ... Our original report and information regarding the remaining Java ...
    (Full-Disclosure)