
import java.awt.*;
import javax.swing.*;
import java.util.Random;

/**
 * Class MilkyWay - write a description of the class here
 * 
 * @author Chase Conner
 * @version JDK 8
 * @course CSCI 1130-01
 * @date 10-22-15
 */
public class MilkyWay extends JApplet 
{
  
    /**
     * Paint method for applet.
     * 
     * @param  g   the Graphics object for this applet
     */
    public void paint(Graphics g)
    {
        for ( int c = 1; c <= 100; c++)
        {
            Random rand = new Random(); //intializes and declares Random alias 
            
            /*
             * declares and initalizes the random methods
             * that will be used to rnadomize the
             * x and y coordinates of a circle
             */ 
            int n = rand.nextInt(600)+1; 
            int h = rand.nextInt(1950)+1;
            
            //declares and initializes the random method for the width and height of a circle
            int m = rand.nextInt(100)+1;
            
            //declares and initializes the x and y coordinates of the circle 
            int x = n;
            int y = h;
           
            //declares and initializes the width and height of the circle 
            int width = m;
            int height = m;  
            
            //makes random custom colors 
            int R = rand.nextInt(256);
            int G = rand.nextInt(256);
            int B = rand.nextInt(256);
   
            Color randomColor = new Color(R, G, B);   //declares and initializes a random color     
            
            g.setColor (randomColor); //sets the random color 
            
            g.drawOval (x + c*20, y, width, height); //draws the circle
            g.fillOval (x + c*20, y, width, height); //fills circle 
            

        
        } 
}

}
