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!

Flood Fill JButtons

843807Oct 30 2009 — edited Nov 3 2009
Hi,

I'm working on a clone of the classic Minesweeper game. If you are familiar with it, you know that if you click on an empty square, the squares surrounding it will reveal themselves and the squares around ALL empty spaces, that become revealed, will then become revealed.

I am familiar with the flood fill algorithm, but Java can't handle the recursion in the algorithm.

Can someone help me with implementing an algorithm which will flood fill in a 2D array of JButton objects?

A good link for flood fill can be found here . I could be misunderstanding how the algorithm works.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 1 2009
Added on Oct 30 2009
10 comments
269 views