Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Java Paint Bucket Tool

843807Sep 1 2005 — edited Nov 7 2007
Hi. I�m working on a simple paint program and I�m having some trouble with the bucket or filling tool. This tool must fill any shape drawn by the user with the current color (the user clicks on a given point and the tool replaces the color of the area surrounding that point with the new color). I have used several algorithms for this (flood fill, boundary fill, etc..) but non of them seem to work. The recursive ones cause an out of stack or out of memory error, and iterative versions are too slow and never finish (only good for filling very small areas) .
I was wondering if there is any way in Java to go around this.
Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 5 2007
Added on Sep 1 2005
2 comments
233 views