At some point, something has to paint the line again when you remove
the circle, even if it's only by copying a bitmap from offscreen memory.

I don't know if LayeredPane can be made to do what you want, sorry...
In Diva we have layers, all that happens when something changes is
that each layer is asked to paint itself into the damaged rectangle.

I forgot to mention that you also need to set a clip region on the
Graphics2D
before doing the paint. HTH,

JohnR

Abhishek Banugariya wrote:

let me explain what i want to do.

 suppose i have one line

  e.g(1)  --------  (consider complete line instead of dotted line)

now when mouse comes over the end point of the line  then i want to highlight that endpoint with small circle like.

   e.g(2)      --------()  (conside () as a full circle and dotted line as complete line)

  for that i will use the getGraphics() method of the canvas the will draw the circle there , now say mouse is moved from the line end point to somewhere else
so i have to remove that circle .

   e.g(3)     --------

    for that i can draw circle at the same place and the color of the circle will be white(background color of canvas) , but this will cut the line
   e.g(4)   _____ _

for above all i can use update method so that graphics wan't flicker.

    now say i have two layer one displays the line and one such mouse over circles . so when mouse moved from the end point to somewhere else then i can clear whole layer( layer of circle). so i don't have to repaint whole drawing . but here my layers should be transparent.

 i got your diva link while searching the list , I will try that .

===========================================================================
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