Guest User

Untitled

a guest
May 24th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. import java.awt.*;
  2. import java.util.Random;
  3. public class Planet{
  4. Random rand = new Random();
  5. int planetSize = rand.nextInt(15)+35;
  6. int x = rand.nextInt(750);
  7. int y = rand.nextInt(550);
  8. public void draw(Graphics g){
  9. Graphics g2 = (Graphics2D)g;
  10. g2.drawOval(x, y, planetSize, planetSize);
  11. }
  12. }
Add Comment
Please, Sign In to add comment