title: Java timer random time each time between 2 values
body: <p>I have a javax.swing.Timer which needs to run a method, after a random time between two int's.</p>
  
  <p>After the object is made the object needs to keep 'running' (as in keep doing the thing int the timer).</p>
  
  <p>what i have tried:</p>
  
  <pre><code>private int minimal = 30;
  private int Max = 1000;
  int randomTimeOutput; 
  Random randomTime;
  Timer timerRunAction
  
  public Object()
  {
      randomTime = new Random();
      randomTimeOutput =  (minimal +
          randomTime.nextInt(Max - minimal + 1));
      timerRunAction = new Timer(randomTimeOutput, this);
      timerRunAction.start();
  }
  
  private void doSomething()
  {
      //Do something
  }
  
  private void actionPerformed(ActionEvent e)
  {
      dosomething();
  
  }
  </code></pre>
  
  <p><em>i have changed the names to make it more readable Object isn't the real class ofcause.</em></p>
  
  <p>But what happens is : the timer runs in a random times but it keeps running in the random time it runs the first time in. </p>
  
  <p>So it isn't changing the time ,after each time it finished running.</p>
  
  <p>How can i make it happen so it will run with a different time every time ?</p>