SHARE
TWEET

Untitled

a guest Apr 25th, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.         public void cos(){
  3.  
  4.             Thread thread = new Thread(() -> {
  5.  
  6.                 this.number = (int) (Math.random() * 4);
  7.                 this.radius = (int) (Math.random() * (getHeight() / 2));
  8.                 this.x = (int) (Math.random() * (getWidth() + 50));
  9.                 this.x1 = (int) (Math.random() * (getWidth() + 30));
  10.                 this.y = (int) (Math.random() * (getHeight() + 50));
  11.                 this.y1 = (int) (Math.random() * (getHeight() + 50));
  12.  
  13.             });
  14.  
  15.             thread.start();
  16.  
  17.             try {
  18.                 thread.sleep(200);
  19.             } catch (InterruptedException e) {
  20.                 e.printStackTrace();
  21.             }
  22.             removeAll();
  23.             repaint();
  24.             System.out.println("x: " + x + " ,y: " + y);
  25.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top