Hi,
I suppose ur painiting line on Panel, add mouse listener to that panel and
in mouseMoved event track if intersecting any line and if it is
intersecting, make that line's Stroke to thick or what ever you want.
As far as my knowladge, you don't have to use layered pane, just while
painitng you can change required line's stroke.
Hope this clears your question.

regards,
Ritesh

---------------------------------
Ritesh Basatwar
Orillion India Software Pvt Ltd
Vanenburg IT Park
E-4,Plot No.17
Madhapur,
Hyderabad-500033 (A.P)
Tel (R): 3413762
      (M): 98480 75967
---------------------------------



----- Original Message -----
From: "Abhishek Banugariya" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 17, 2002 9:31 AM
Subject: [JAVA2D] JLayeredPane Layers with Canvas


> Hi All
>    i am new with the graphics programming. I want to highlight the object
on the canvas when mouse pointer comes on the object. e.g. if mouse comes on
the end point of a particualr Line2D then i want to highlight that point,
similarly if mouse comes anywhere on the line2D then i want to highlight
that line. Now what i am thinking is if i go for layers then my program will
be faster , one layer will be used for highlighting the objects,one for
original drawing  etc.
> I am planning to use canvases with JLayeredPane for the layers, but for
that my canvas should be tranparent. please guide me is there any other
approach for the same or how generally people are implementing such
mouseover effects.
>
>
> Abhishek
>
>
===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff JAVA2D-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to