I made this minesweeper game earlier this summer. It shows many things, including:
1D array to 2D array,
changing the way a JButton works depending on mouse button used,
slightly long, 382 lines, can probably be condensed.
There is one known bug that i cannot seem to fix: when a floodfill causes a win, and the OK button is clicked on the win dialog, it will automatically click a button on the new game, not a problem usually, but in games that are set to be large with a small amount of bombs, it can cause an infinite loop :( , if you see a fix please comment or PM me, thanks.