void keyPress(char k) {
    switch(k) {
      case(KeyEvent.VK_BACK_SPACE) :
      case(KeyEvent.VK_DELETE)     :
        if (allEntries.size() > 0) {
          allEntries.removeLast() ;  //delete last letter.
          needsFormat = true ;
        }
        break ;
      case(KeyEvent.VK_ESCAPE) :
      case(KeyEvent.VK_ENTER)  :
      case(KeyEvent.VK_ACCEPT) :
        escaped() ;
        break ;
      default :
        addEntry(k, null, null) ;
    }
  }