List HTML Values
/* Core SWING Advanced Programming By Kim Topley ISBN: 0 13 083292 8 Publisher: Prentice Hall */ import javax.swing.text.html.HTML; public class ListHTMLValues { public static void main(String[] args) { HTML.Tag[] tags = HTML.getAllTags(); HTML.Attribute[] attrs = HTML.getAllAttributeKeys(); System.out.println("HTML Tags:"); for (int i = 0; i < tags.length - 1; i++) { System.out.print(tags[i] + ", "); if ((i % 8) == 7) { System.out.println(""); } } System.out.println(tags[tags.length - 1]); System.out.println("\n\nHTML Attributes:"); for (int i = 0; i < attrs.length - 1; i++) { System.out.print(attrs[i] + ", "); if ((i % 8) == 7) { System.out.println(""); } } System.out.println(attrs[attrs.length - 1]); } }