The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
February 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Links In Applets!!

Posted by Sanjay Ambardar on February 05, 2001 at 2:44 AM

> Thanks Kishori,

> I had asked in the january forum about how to build the links to a web page in an Applet using a simple Label in jdk 1.1!! I did try your solution. Here are some of my concerns.

> I just want to know why have you used add ( new Button ( "Does nothing" ) ) in the code. Also when I move the mouse I don't get the events for the label but instead I get them when I move the mouse in and out of the frame in which they are painted!! Why so

> I have also put this question in the january forum. In order to recollect please see that forum

> Thanks a lot for your help
> Sanjay

Sorry kishori!! Let me rephrase the previous question.
Actauuly when I associate a MouseListener with a Label, I receive the MousePressed, MouseEntered etc. events on the label as well as on the container on which the label is pasted. So it may be basically a question of identifying in these methods which component generated the event. I can use the getComponent() method to get the component type which generated this event. What i want to know is how do i use this method i.e with what do i compare the result of getComponent() result in order to identify the object which generated the event or else is there any other approach to do the above mentioned process!!

Thanks
Sanjay




Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us