title: Nesting of timers
body: <p>This post is related to my <a href="https://stackoverflow.com/questions/14183734/issue-with-timertask">last</a> post.The block of code changes the text to desired color after desired time.
  however, now I want to change the color of a perticular word such that each letter gets the equal time.EG if "hello" have been given a time of 1000 milliseconds (have 5 letters) then 'h''e''l''l''o' each letter should get 1000/5 milliseconds i.e 200 milliseconds each.  </p>
  
  <p>I implemented swing timer for this :</p>
  
  <pre><code>public Reminder() {
  
      a[0]=2000;
      a[1]=1000;
      a[2]=3000;
     a[3]=5000;
      a[4]=3000;
  ActionListener actionListener = new ActionListener() {
    public void actionPerformed(ActionEvent actionEvent) {
    point =point +arr[i].length();
  i++;
  
       doc.setCharacterAttributes(0,point+1, textpane.getStyle("Red"), true);
       timer.setDelay(a[i]);
  
      }
  };
  
  timer = new Timer(a[i], actionListener);
  timer.setInitialDelay(0);
  timer.start();
  </code></pre>
  
  <p>For this to happen, shoud I use another <code>Timer</code> inside the <code>actionListener</code> to give further timings to a perticular letter?Or should I first break the time by <code>.length()</code>
  and then use the timer?I cannot decide a better way.Any ideas?</p>