Something I coded up quickly as a refresher in Java swing and to revisit an interview question from a certain company... Please do whatever you want with this. Hopefully others learn something!
Input an index of a cell shown on the screen and the program will calculate the number of adjacent cells with the same color (recursively). You can change a cell's color by clicking on it.