AWT Event handling


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: AWT Event handling

Hybrid View

  1. #1
    Toby Guest

    AWT Event handling


    I am trying to develop my first java applet - essentially some navigation
    on the side of a site.

    I am trying to add images to the main panel, and then pick up mouse and action
    events. As I have just discouvered, an image object is not an event source.


    Is there any way of making it so?

    If so, would this be by extending/implementing a component, or the other
    way around?

    Toby

  2. #2
    Raida Guest

    Re: AWT Event handling


    Toby,
    I had worked with something similar.
    I did extend Componet in class MyImage.
    Since addMouseListener(MouseListener) is a method inside the Component class
    if we take a look at the java API Specifications


    "Toby" <tmatthews@signals.co.uk> wrote:
    >
    >I am trying to develop my first java applet - essentially some navigation
    >on the side of a site.
    >
    >I am trying to add images to the main panel, and then pick up mouse and

    action
    >events. As I have just discouvered, an image object is not an event source.
    >
    >
    >Is there any way of making it so?
    >
    >If so, would this be by extending/implementing a component, or the other
    >way around?
    >
    >Toby



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center