I have three questions/problems. (NOTE - I don't have enough reputation to post pics, so I linked them. And I needed to obfuscate them...)
1) I created a panel that holds my game graphics (the player area). The panel is supposed to be 800x800 and clip everything that lies below and to the right. But when I add the graphics panel to a JFrame, it doesn't clip. So images go over on the right and left. This is a picture of how to game starts. Ideally, the graphics would start in this rectangle the whole time:
Picture #1: http://i.imgur.com/idL8f.png
Now, here's what happens when I press play to start.
Picture #2: http://i.imgur.com/dxtbe.png
How can I set the panel/frame so that the graphics only occupy 800x800 (like the first picture) and everything else is clipped?
2) I'm a bit confused about how I can set up the JFrame. This is how I want it to be layed out:
Picture #3: http://i.imgur.com/ZyJS5.png
How would you lay the JFrame/Panels out? I was thinking BorderLayout, but I'm not certain it would work out.
3) For this game, my class that extends JFrame also contains main(). Is this bad practice?** Are you supposed to not extend JFrame on the main class?