System.out.println((String)lm.getElementAt(index)); strokeDesc.setText(mapper.getKeyStrokeDesc((String)lm.getElementAt(index)));
Object o = lm.getElementAt(index); if (o instanceof String) { System.out.println((String)o); strokeDesc.setText(mapper.getKeyStrokeDesc((String)o)); } else if (o instanceof Macro) {  Macro m = (Macro)o; strokeDesc.setText(mapper.getKeyStrokeDesc(m.getFullName())); }
   private void setKeyDescription(int index) {      // This try and catch is to fix a problem in JDK1.4-betas      try {         if (!macros && !special) {            KeyDescription kd = (KeyDescription)lm.getElementAt(index);            strokeDesc.setText(mapper.getKeyStrokeDesc(mnemonicData[kd.getIndex()]));         }         else {            if (macros) {               System.out.println((String)lm.getElementAt(index));               strokeDesc.setText(mapper.getKeyStrokeDesc((String)lm.getElementAt(index)));            }            if (special) {               System.out.println((String)lm.getElementAt(index));               String k = "";               k += ((String)lm.getElementAt(index)).charAt(7);               strokeDesc.setText(mapper.getKeyStrokeDesc(k));            }         }      }      catch (ArrayIndexOutOfBoundsException ar) {         System.out.println("ar at index " + index + " - " + ar.getMessage());      }   }