title: Stopping swing Timer after it have executed one time
body: <p>In a game that I'm making I have a power up that I only want to be visible for 10 seconds and then disapear. Therefor whenever you get the power up I run a swing <code>Timer</code> that have it's initial delay set to 10 seconds (10_000) and I have also set repeats to false so it should only run one time. </p>
  
  <p>Whenever I first get the power up it will only be visible for 10 seconds as intended but when I get it again it will only be visible for a random amount of time (but never over 10 seconds) so therefor it seems like it does repeat itself. So how can I make it stop after it have runne one time when <code>setRepeats(false);</code> doesn't work?</p>
  
  <p>This is the code for what happens when you get the power up.</p>
  
  <pre><code>if(!power.getPowerUp()){
   double xAirdrop = xSize - 500;
   double yAirdrop = ySize - 500;
   power.setX(Math.random() * xAirdrop + 64);
   power.setY(Math.random() * yAirdrop + 150);
   power.setPowerUp(true);
   Timer powerTimer = new Timer(10_000, new ActionListener(){
    public void actionPerformed(ActionEvent e){
     power.setPowerUp(false);  
     power.setWidth(power.getCrate().getWidth(null) + 250);
     power.setHeight(power.getCrate().getHeight(null) + 250);
    }
   });
   powerTimer.setInitialDelay(10_000);
   powerTimer.setRepeats(false);
   powerTimer.start();
  }
  </code></pre>