Once upon a time, I took a class where I had to write a game in Swing for my midterm. This repository is a result of that 16 hour nightmare.
If you have a choice, do not try making a simple game in Swing. Use libgdx instead or better yet, avoid Java all together. Compared to making Solitaire once 
in Visual Studio with Windows Forms, this was far more painful and endured far longer.