Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void cos(){
- Thread thread = new Thread(() -> {
- this.number = (int) (Math.random() * 4);
- this.radius = (int) (Math.random() * (getHeight() / 2));
- this.x = (int) (Math.random() * (getWidth() + 50));
- this.x1 = (int) (Math.random() * (getWidth() + 30));
- this.y = (int) (Math.random() * (getHeight() + 50));
- this.y1 = (int) (Math.random() * (getHeight() + 50));
- });
- thread.start();
- try {
- thread.sleep(200);
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- removeAll();
- repaint();
- System.out.println("x: " + x + " ,y: " + y);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement