public String toString(){
  String s="";
  Enumeration names=getAttributeNames();
  while (names.hasMoreElements()) {
    Object key=names.nextElement();
    Object value=getAttribute(key);
    if (value instanceof AttributeSet) {
      s=s + key + "=**AttributeSet** ";
    }
 else {
      s=s + key + "="+ value+ " ";
    }
  }
  return s;
}

public String toString ( ) { String s = "" ; Enumeration names = getAttributeNames ( ) ; while ( names . hasMoreElements ( ) ) { Object key = names . nextElement ( ) ; Object value = getAttribute ( key ) ; if ( value instanceof AttributeSet ) { s = s + key + "=**AttributeSet** " ; } else { s = s + key + "=" + value + " " ; } } return s ; }
converts the attribute set to a string .
