I made a tetris game. On the left is the game zone, I used a JPanel as the canvas. On the right there are score pane, "next block pane" and else. The main frame is fixed, I don't need to refresh the other-than-Canvas-parts so often. I reckoned it would be OK to use components there.
Never, ever use the first way to create games. Its slow and just... gross to use code designed to create UIs to make games with.
Yeah, that's fine. That's called a gui, and you should use gui components to build it, that's what they're for.
What I think opiop said not to do (which you shouldn't) is to draw to a JPanel or something and move the JPanel around the screen instead of simply drawing an image moving in a canvas.
In short: you're doing it right.