Results 1 to 2 of 2
Thread: Ball moving across the screen?
- 05-29-2012, 11:03 PM #1
Member
- Join Date
- May 2012
- Posts
- 1
- Rep Power
- 0
Ball moving across the screen?
Well at school I am using an IDE called Ready to Program, which you probably haven't heard of. I have to make a ball move diagonally across the screen and so far I have this piece of code that apparently worked for some people but it doesn't for me. I think I missed something?
Apologies if this IDE is unfamiliar to you but any help is appreciated.Java Code:import java.awt.*; import hsa.Console; public class Template { static Console c = new Console (); public static void main (String args[]) { int x=0, y=0; while(true) { c.setColor(Color.black); c.fillOval(x,y,30,30); for (int i =1; i <= 100; i++) c.setColor(Color.white); c.fillOval(x,y,30,30); } } }
- 05-29-2012, 11:53 PM #2
Similar Threads
-
Moving a ball
By jsmasand in forum Java 2DReplies: 5Last Post: 04-27-2012, 03:34 AM -
Moving a ball by dragging the mouse
By stevo812 in forum Java AppletsReplies: 5Last Post: 03-31-2012, 12:49 AM -
Ball not moving
By Eleeist in forum New To JavaReplies: 7Last Post: 01-04-2012, 11:27 PM -
Moving a ball with Arrow Keys
By kekcklemen in forum Java AppletsReplies: 5Last Post: 02-25-2011, 10:15 PM -
Moving Cars across the screen, help!
By Keno777 in forum New To JavaReplies: 5Last Post: 03-04-2010, 02:57 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks