Another possibility is to use a BufferedImage as your chessboard. It is then very easy
to draw it in the left upper corner of the JPanel, with size equal to the minimum of
getWidth() and getHeight().
Of course, that has some consequnces for detecting mouse clicks and updating
your board, but I don't think it is difficult to implement.
And anyway, in my chess program, I simply made the frame unresizable