All pastes #896163 Raw Edit

Miscellany

public text v1 · immutable
·published 2008-02-08 12:33 UTC
rendered paste body
jbAutoInc.addActionListener(new ActionListener()
      {
          public void actionPerformed(ActionEvent e)
                {
                    if(ticking)
                    {
                        t.stop();
                        ticking = false;
                    }
                    else{
                        t.restart();
                        ticking = true;
                    }
                    
                }
            }
    );
      
 t = new javax.swing.Timer(200, new ActionListener()
            {
                public void actionPerformed(ActionEvent e)
                {
                    btnNumber++;
                    System.out.println("Timer start: btnNumber now equals: "+btnNumber);
                    updateDisplay();
                }
            }
            );