Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import javax.swing.*;
- import java.awt.*;
- /**
- * Ifrah Osman
- * CSci1130- 51
- * Summer 2016
- *Smiley Project- Unit 3
- */
- public class Smiley extends JApplet {
- Graphics g2d;
- double dx,dy,dheight,dwidth;
- int min, max;
- public void init(){
- min=1;
- max=500;
- dx= min+(int)(Math.random()*(max-min+1))+min;
- dy= min+(int)(Math.random()*(max-min+1))+min;
- dheight=max +(int)(Math.random()*(max- min+1))+min;
- dwidth=max +(int)(Math.random()*(max- min+1))+min;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement