I'm trying to create a checkers game using Swing and I have the board set up already (here).
Each individual tile is placed onto the GUI in a JPanel that is organized via a GridBagLayout manager. In order to put the individual checker pieces onto the tiles, I want to create another JPanel that is an exact copy of the JPanel that holds the board tiles. The copy-JPanel will hold the checker pieces and be transparent, allowing the checker pieces to sit on top of the gameboard.
How will I be able to create this second JPanel? And if it is not possible, what is a better alternative to create the checker pieces on the checkerboard.
Your design could be improved and simplified. Far simpler is to simply create a grid of JPanel cells, held in a GridLayout, and then add JLabel pieces to any individual cell that nees to hold a piece. No need to mirror or duplicate anything. Then if you want to give the user the ability to click and drag pieces, in your mouse listeners code, lift the piece into the glasspane, or use your own JLayeredPane, and move it.
For example, try running this program to see exactly what I mean. It only has one piece, and the logic is simple -- only allow dropping of piece onto a dark square, but it does demonstrate the concepts: