users
[Top] [All Lists]

RE: [cinjug-users] tracing a path

To: Amol Deshmukh <adeshmukh@xxxxxxxxxxxxxx>
Subject: RE: [cinjug-users] tracing a path
From: Chris McMahan <cmcmahan@xxxxxxx>
Date: Tue, 15 Mar 2005 10:16:53 -0500
Cc: "'Jason Kretzer'" <jrkretzer@xxxxxxxxx>, users@xxxxxxxxxx
Delivered-to: mailing list users@cinjug.org
In-reply-to: <E58DC1ED41D5D411AAEE00B0D078F16208EF78D8@arnie.collegeview.com>
Mailing-list: contact users-help@cinjug.org; run by ezmlm
References: <E58DC1ED41D5D411AAEE00B0D078F16208EF78D8@arnie.collegeview.com>
That's a very nice solution!

- Chris

Amol Deshmukh writes:
>> > -----Original Message-----
>> > From: Jason Kretzer [mailto:jrkretzer@xxxxxxxxx] 
>> > Sent: Tuesday, March 15, 2005 9:44 AM
>> > To: users@xxxxxxxxxx
>> > Subject: Re: [cinjug-users] tracing a path
>> > ...
>> > the points to stay put?  After I draw a point and
>> > call
>> > repaint on the JComponent toshow that point, the
>> > point
>> > that I drew just before that disappears.
>> > ...
>
>you may want to consider using 
>
>     repaint(int x,int y,int width,int height)
>
>instead of repaint(). Then redraw the set of points in only
>that portion of rectangle. So every time the ball moves,
>you only update a small rectanlgular portion of the 
>Component instead of redrawing all the points.
>
>
>More help at :
>
>http://java.sun.com/products/jfc/tsc/articles/painting/index.html
>
>
>HTH,
>~ amol

-- 
    ================================
    Chris McMahan | cmcmahan@xxxxxxx
    ================================


<Prev in Thread] Current Thread [Next in Thread>