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 12:22 PM

> Hi Sanjay
> I think just setCursor ( ) for label will do. You don't need to use any mouse event handler. For getComponent() just use code in Mouse events like
> if ( e.getComponent ( ) == linkLabel ) {
> }
> where linkLabel is declared as
> Label linkLabel = new Label ( "Link 1" );
> I mean linkLabel is the reference to your lable in applet.

> Thanx
> Kishori

Thanks Kishori

The problem I am getting is that when I use the getComponent() method, it returns me true even if the mouse enters the container on which the label is pasted. So it returns me true whenever the mouse enters the container or the label But I want to get it true only when the mouse enters the label. The container I am using, I think, as well implements the MouseListner!! So is there any way out\

Thanks
Sanjay




Replies:
  • RE:Links Kishori Sharan February 05, 2001 at 2:08 PM (0)

Sponsored Links



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