|
-
February 3rd, 2012, 10:02 AM
#2
Re: Help making me move an oval using Java?
Please tell me what i did wrong
- To start with you didn't post the code in code tags so it's now difficult to read which means I won't do anything other than give it a cursory glance.
- You shouldn't be trying to draw on, add KeyListeners to etc a JFrame, you should be using a JComponent such as a JPanel, which you add to the JFrame.
- When handling the drawing yourself you shouldn't override the paint method, you should override the paintComponent method instead - read the Java tutorial on 2D graphics
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|