This game starts off with the initial grid of multi colored pixels with 4 color selections on the bottom panel that matches the colors in the grid. The purpose of the game is to, starting from the top left corner of the grid, connect the adjacent color blocks by selecting one of the four colors on the bottom until the whole screen becomes one color in a specified number of moves. The grid will be created by paintComponent that randomly selects a color from the four colors and displays it on a Jpanel with the grid layout. As each button is clicked, the block with be repainted with the color that was clicked and the amount of turns left will decrease by 1.
An example of the game 'Floodit' you can play can be found here