import javax.swing.AbstractButton;
import javax.swing.JLabel;
import javax.swing.text.JTextComponent;
public class Util {
public static boolean hasDisplayedName(Class componentClass) {
return ((AbstractButton.class.isAssignableFrom(componentClass))
|| (JLabel.class.isAssignableFrom(componentClass))
|| (JTextComponent.class.isAssignableFrom(componentClass))
);
}
}
|