public void initGUI(){
  removeAll();
  try {
    URL url=PropUtils.getResourceOrFileOrURL(TimerControlButtonPanel.class,forwardIconURL);
    forwardIcon=new ImageIcon(url);
    url=PropUtils.getResourceOrFileOrURL(TimerControlButtonPanel.class,forwardStepIconURL);
    forwardStepIcon=new ImageIcon(url);
    url=PropUtils.getResourceOrFileOrURL(TimerControlButtonPanel.class,backwardIconURL);
    backwardIcon=new ImageIcon(url);
    url=PropUtils.getResourceOrFileOrURL(TimerControlButtonPanel.class,backwardStepIconURL);
    backwardStepIcon=new ImageIcon(url);
    url=PropUtils.getResourceOrFileOrURL(TimerControlButtonPanel.class,pauseIconURL);
    pauseIcon=new ImageIcon(url);
  }
 catch (  MalformedURLException murle) {
    Debug.error("TimerToggleButton: initGUI() bad icon.");
  }
catch (  NullPointerException npe) {
    Debug.error("TimerToggleButton: initGUI() bad icon.");
    npe.printStackTrace();
  }
  JToolBar jtb=new JToolBar();
  jtb.setFloatable(false);
  backwardButton=new JButton(backwardIcon);
  backwardButton.setToolTipText("Run Timer Backwards");
  backwardButton.setActionCommand(TimerStatus.TIMER_BACKWARD);
  backwardButton.addActionListener(this);
  forwardStepButton=new JButton(backwardStepIcon);
  forwardStepButton.setToolTipText("Step Timer Backward");
  forwardStepButton.setActionCommand(TimerStatus.TIMER_STEP_BACKWARD);
  forwardStepButton.addActionListener(this);
  jtb.add(forwardStepButton);
  forwardButton=new JButton(forwardIcon);
  forwardButton.setToolTipText("Run Timer Forward");
  forwardButton.setActionCommand(TimerStatus.TIMER_FORWARD);
  forwardButton.addActionListener(this);
  jtb.add(forwardButton);
  backwardStepButton=new JButton(forwardStepIcon);
  backwardStepButton.setToolTipText("Step Timer Forward");
  backwardStepButton.setActionCommand(TimerStatus.TIMER_STEP_FORWARD);
  backwardStepButton.addActionListener(this);
  jtb.add(backwardStepButton);
  add(jtb);
}

public void initGUI ( ) { removeAll ( ) ; try { URL url = PropUtils . getResourceOrFileOrURL ( TimerControlButtonPanel . class , forwardIconURL ) ; forwardIcon = new ImageIcon ( url ) ; url = PropUtils . getResourceOrFileOrURL ( TimerControlButtonPanel . class , forwardStepIconURL ) ; forwardStepIcon = new ImageIcon ( url ) ; url = PropUtils . getResourceOrFileOrURL ( TimerControlButtonPanel . class , backwardIconURL ) ; backwardIcon = new ImageIcon ( url ) ; url = PropUtils . getResourceOrFileOrURL ( TimerControlButtonPanel . class , backwardStepIconURL ) ; backwardStepIcon = new ImageIcon ( url ) ; url = PropUtils . getResourceOrFileOrURL ( TimerControlButtonPanel . class , pauseIconURL ) ; pauseIcon = new ImageIcon ( url ) ; } catch ( MalformedURLException murle ) { Debug . error ( "TimerToggleButton: initGUI() bad icon." ) ; } catch ( NullPointerException npe ) { Debug . error ( "TimerToggleButton: initGUI() bad icon." ) ; npe . printStackTrace ( ) ; } JToolBar jtb = new JToolBar ( ) ; jtb . setFloatable ( false ) ; backwardButton = new JButton ( backwardIcon ) ; backwardButton . setToolTipText ( "Run Timer Backwards" ) ; backwardButton . setActionCommand ( TimerStatus . TIMER_BACKWARD ) ; backwardButton . addActionListener ( this ) ; forwardStepButton = new JButton ( backwardStepIcon ) ; forwardStepButton . setToolTipText ( "Step Timer Backward" ) ; forwardStepButton . setActionCommand ( TimerStatus . TIMER_STEP_BACKWARD ) ; forwardStepButton . addActionListener ( this ) ; jtb . add ( forwardStepButton ) ; forwardButton = new JButton ( forwardIcon ) ; forwardButton . setToolTipText ( "Run Timer Forward" ) ; forwardButton . setActionCommand ( TimerStatus . TIMER_FORWARD ) ; forwardButton . addActionListener ( this ) ; jtb . add ( forwardButton ) ; backwardStepButton = new JButton ( forwardStepIcon ) ; backwardStepButton . setToolTipText ( "Step Timer Forward" ) ; backwardStepButton . setActionCommand ( TimerStatus . TIMER_STEP_FORWARD ) ; backwardStepButton . addActionListener ( this ) ; jtb . add ( backwardStepButton ) ; add ( jtb ) ; }
set the imageicons to whatever is set on the url variables . sets the running icon to be the pressed icon , and makes the stopped and inactive icons .
