Has Displayed Name : Accessible « Swing JFC « Java






Has Displayed Name

   
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))
    );
  }
}

   
    
    
  








Related examples in the same category

1.implement Accessible to make your object accessible
2.Setting an Accessible Name for an Image Button
3.Setting a Description for Image Icons
4.Setting a Mnemonic for Buttons for Accessible
5.Setting a Mnemonic for a Menu for Accessible
6.Associating a Label with a Component
7.Setting a Keyboard Accelerator for a Menu Item
8.A GUI to show accessible information coming from the components in an
9.An example of getting the Accessible information from a Button objectAn example of getting the Accessible information from a Button object