DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  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



Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links