
import java.awt.*;
import javax.swing.*;
import java.util.Random;

/**
 * Class MilkyWay - write a description of the class here
 * 
 * @author Thomas Haller
 * CSCI 1130-51
 * @version 1.00
 * date 2/14/17
 */
public class MilkyWay extends JApplet
{


public void paint(Graphics g){

      int height = this.getHeight(); //returns height of applet
      int width = this.getWidth(); // return width of applet
      
      g.fillRect(0,0, width, height); // sets background color to black
      
      Random num=new Random(); 
        
      for( int i = 0; i < 100; i++){
   
           int x= num.nextInt( width ); // random x coordinate for circle
           int y = num.nextInt( height ); // random y coordinate for circle
           int diameter = num.nextInt( 100 ); // random diameter for circle 
    
           g.setColor(new Color(num.nextInt( 256 ), num.nextInt( 256 ), num.nextInt(256 ))); // random RGB color for circle
           g.fillOval( x, y, diameter, diameter ); 
             
    } // end loop 

        }
        
            }


    




       
        

        








