title="P4JSP Labels";

Labels:

class LabelComparator implements Comparator { public int compare(Object o1, Object o2) { return ((Label)o1).getName().compareTo(((Label)o2).getName()); } public boolean equals(Object o) { return this.equals(o); } } TreeSet ts = new TreeSet(new LabelComparator()); Enumeration en = Label.getLabels(env); while (en.hasMoreElements()) { ts.add(en.nextElement()); } Iterator itr = ts.iterator(); while (itr.hasNext()) { Label lbl = (Label)itr.next(); out.print("<TR>"); out.print("<TD>"+lbl.getName()+"</TD>"); out.print("<TD>"+lbl.getDescription()+"</TD>"); out.print("</TR>"); }
LabelDescription