Even when you fix that, i set it at 15 for example instead of meteorList.size(), and it still doesnt close or do anything.
Type: Posts; User: bglueck
Even when you fix that, i set it at 15 for example instead of meteorList.size(), and it still doesnt close or do anything.
Yeah me too. I dont know what thats about either. I have to force close it
Your right. Thanks for catching my mistake.
Just another thought. Could nothing happening also be the result of the repaint method call not working?
I expect that several randomly placed(on the x axis) white balls will fall down, and the red ball follows your mouse. I expected that at least, i knew I would have to fix up a couple other glitches,...
you could also use a SENTINEL constant value that the user can type to escape the loop. make another switch statement after the
System.out.println("Again?");
String again = input.nextLine(); that...
A single white ball appears at the top of the screen, and a red ball appears in the general area of where your mouse was when you ran the program. Nothing else happens.
This looks over-engineered, or I don't understand what you are doing.
Simply put, this will continue the loop if the user enters yes, and discontinue it if the user enters no.
import...
I made a game that creates meteors in random places at the top of the window, they fall, and you have to avoid them. The only problem is, it doesn't work right. There are no errors, it just doesn't...
thank you so much copeg. ill add that. will I need to take all the drawOval calls out of the various constructors and put them in that override or can they remain there, just slightly altered? if the...
//Meteor.java
import java.applet.*;
import java.awt.*;
public class Meteor {
//Problem
Graphics g;
//Randomize x coordinate of meteor
private int randomNum = (int)(Math.random() * 250);...
I am creating a program for my final in an AP computer science class. My idea was simple: create a program that drops "meteors" and you have to dodge them with your mouse. I wrote the whole...