Gary,

Why not do the rendering in a separate thread and render to an offscreen
image source. Then you could periodically redraw that offscreen source
to your window. That should solve the mouse click problem. Then, if the
user clicks a stop button, simply tell the separate thread to stop
rendering.

I wrote a raytracing application that way, and it seemed to work pretty
well. Hopefully the architecture makes sense for your program as well.

-Matt

Gary Myron wrote:
>
> Hi all,
>
> I have an application that can take over a minute drawing to the
> display.  I would like
> to give the customer the ability to cancel drawing at any point by using
> some control
> character.  I would would also like to interrupt a current paint if the
> user clicks on a
> button or control that would cause a later repaint.
>
> Currently the paint code executes in the same thread as the GUI.  The
> user can move
> the cursor around while painting.  Mouse clicks, however, are not
> processed until the
> paint is complete.  My question is how can I find out what mouse clicks
> are pending
> or control character are typed while painting (without adding too much
> of a performance
> penalty)?
>
> --Gary
>
> ===========================================================================
> 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".

--
-------------------------------
         Matt Tucker
     [EMAIL PROTECTED]
 http://cs.uiowa.edu/~matucker

      See CoolServlets:
  http://www.coolservlets.com
-------------------------------

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