import java.beans.*; import java.util.*; import java.awt.*; public class AvailableEditors { public static void main (String[] args) { Class aType; PropertyEditor propertyEd; Stack unsupportedTypes = new Stack(); // the class types we want to discover an editor for Class[] types = { Boolean.class, Character.class, Byte.class, Short.class, Integer.class, Long.class, Float.class, Double.class, String.class, Date.class, Color.class, Point.class, Dimension.class, Font.class }; // iterate over all types and see if there's a PropertyEditor for them for (int i=0; i < types.length; i++) { aType = types[i]; propertyEd = PropertyEditorManager.findEditor(aType); if ( propertyEd != null ) { System.out.println(aType.getName() + " has its PropertyEditor ("+ propertyEd +")"); } else { unsupportedTypes.push(aType); } } // now print all types which are not supported by a custom editor while ( ! unsupportedTypes.empty() ) { aType = (Class) unsupportedTypes.pop(); System.out.println("NO editor for " + aType.getName()); } System.exit(0); // force JVM to quit (AWT thread is still alive) } } // End of Class AvailableEditors