Can I ask how? I’m not trying to be argumentative or disagree, I just honestly can’t see how Canvas is easier than JPanel or JComponent.
[quote=“jonjava,post:9,topic:41032”]
You can call add(JPanel) or add(JComponent) just as easily though, can’t you?
I wouldn’t suggest putting the ui and the game inside the same component. Instead, extend JPanel or JComponent (exactly like you do with Canvas), then override paintComponent() and you get double buffering for free. Then use a completely different JPanel for your ui (buttons, checkboxes, whatever), probably again exactly like you’d do with Canvas. This is my standard way of mocking up a game, and I don’t see how Canvas makes that easier.
I feel like I’m missing something obvious, but I can’t see what it is.