Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.*;
- import java.util.Random;
- public class Planet{
- Random rand = new Random();
- int planetSize = rand.nextInt(15)+35;
- int x = rand.nextInt(750);
- int y = rand.nextInt(550);
- public void draw(Graphics g){
- Graphics g2 = (Graphics2D)g;
- g2.drawOval(x, y, planetSize, planetSize);
- }
- }
Add Comment
Please, Sign In to add comment