
Signature
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
> > I'm faced with a rather strange problem here for which I included the source
> > code as a sscce.
>
> Why is everybody looking at ..me? ;-)
Hihi - I find the sscce a very useful way of solving a problem. Most times
actually creating the sscce out of a large chunk of source can solve the
problem!
> > In this piece of source code, I'm drawing a lot of ovals in a gradient
> > colour (blue/green), but the rightmost colours come out white even though
[quoted text clipped - 5 lines]
> I did not experience the same behaviour you
> described.
Well, maybe this will clear some things up: I've made two screenshots, one
with the ovals, and one with the rectangles. You can find them here:
http://www.mycgiserver.com/~holdencaulfield/grid01.jpg (170k, ovals)
http://www.mycgiserver.com/~holdencaulfield/grid02.jpg (17k, rectangles)
The grayed out border and the coordinates on screen are from the screen
capture tool, so you can safely ignore those.
> With the drawOval example I saw your gradient,
> with the missing bits showing as black.
As you can see in the screenshot, the last 200+ ovals are all white.
> When I changed to the rectangle, I got a rough
> equivalent of a gradient, but as opposed to the
> first exapmple, the edges of the rectangles met,
> so there was no black showing though.
Indeed - which is as it should be. I'm not concerned about the black edges
(which are logical given the size of the ovals), it's the white dots that
bother me.
> Could I get you to try something? Drop the
> rectangles you are drawing to half size,
> then render them, see if that makes anything
> click into place..
Nope - that just leaves black edges, which was not the problem in the first
place. I really should have posted the link to the screenshots earlier,
sorry for that.
> (And BTW, nice example, but could I ask
> you to keep the lines shorter in future?
> The lines with the drawOval/drawRect
> methods wrapped..)
Oops - I didn't notice that... and it is indeed annoying (since I just had
to copy the code from my post to another machine because I left the source
at work).
> Lastly... is this an experiment?
> Are you familiar with GradientPaint?
This is an experiment - I'm supposed to run a test on some software in a few
days, where there are two factors that need to be monitored. I just thought
it would be nice to see them live: x, y are the factors, and the colour is
the percentage/test score: the brighter the colour, the higher the score.
The highest score would be marked in a different colour.
It wasn't supposed to be a gradient, but while writing this Grid for the
test component, I thought it would be nice to try a gradient - until I found
this error.
I am not familiar with GradientPaint, but I'll be sure to check it out -
could come in handy later on for other stuff...
Lastly, I tried this at home and at work: both machines are P4-2.x, with 512
or 768 MB RAM. It takes ages to render the ovals, and my machine even
crashed and started bothering me with messages of 'low memory' while
performing the test today... Strange...
Any ideas? Thanks for your help so far!
Regards,
Princess Morgiah
Andrew Thompson - 08 Sep 2004 00:23 GMT
> "Andrew Thompson" <SeeMySites@www.invalid> wrote in message
>>> I'm faced with a rather strange problem here for which I included the
> source
[quoted text clipped - 5 lines]
> actually creating the sscce out of a large chunk of source can solve the
> problem!
That's the ticket! But..
> Well, maybe this will clear some things up: I've made two screenshots,
..a picture paints a thousand words!
>..one
> with the ovals, and one with the rectangles. You can find them here:
> http://www.mycgiserver.com/~holdencaulfield/grid01.jpg (170k, ovals)
Wow.. *Now* I see what you mean..
I got none of the white area. I even 'messed
up' your frame. When I enlarged it, I got
grey border around the area you did not paint
(as expected) but still got the rest of the
grid reliably. Gradient blue/green with black.
( Let me know if you want to see a screenshot. )
...hmmm. I looked at it using 1.5.0-beta
on WinXP, what OS/Java are you using?
[ I am beginning to wonder if you've discovered
some quirky rendering bug.. ]

Signature
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
Princess Morgiah - 09 Sep 2004 22:15 GMT
> > with the ovals, and one with the rectangles. You can find them here:
> > http://www.mycgiserver.com/~holdencaulfield/grid01.jpg (170k, ovals)
>
> Wow.. *Now* I see what you mean..
Indeed - I tried explaining it to a few colleagues and they were all a
little confused as to the problem, until I showed them this picture. It
really is a strange sight, and it gets even stranger if you draw the ovals
in a random order! The last x ovals always remain white...
> I got none of the white area. I even 'messed
> up' your frame. When I enlarged it, I got
[quoted text clipped - 3 lines]
>
> ( Let me know if you want to see a screenshot. )
Thanks for offering, but I can see what you mean - read on please...
> ...hmmm. I looked at it using 1.5.0-beta
> on WinXP, what OS/Java are you using?
> [ I am beginning to wonder if you've discovered
> some quirky rendering bug.. ]
Well, I'm beginning to think along the same lines. I've tried it with a 1.3
which did not produce this strange problem, I haven't tried the 1.5 yet.
The problem occurs in 1.4 (early beta versions) on Windows XP (at work) and
Windows 2000 (at home).
I've been browsing through the bug database at Sun for a while and I've
found related issues, but none that are closely related. Or at least, close
enough :)
During the weekend I'll try to get to the bottom of this, as I know lack the
time for it, and then I'll post my results. Just in case someone should feel
the mad need to draw some ovals on a JPanel.
Regards,
Princess Morgiah
Andrew Thompson - 10 Sep 2004 05:15 GMT
> The problem occurs in 1.4 (early beta versions) on Windows XP (at work) and
> Windows 2000 (at home).
I suspect that is at the root of the problem.
Those early 1.4 releases were very buggy.

Signature
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology