List of usage examples for javax.swing JComponent addVetoableChangeListener
public synchronized void addVetoableChangeListener(VetoableChangeListener listener)
VetoableChangeListener
to the listener list. From source file:Main.java
private static void addJContainerListeners(JComponent c, Object... objs) { if (c == null) return;/*from www .ja v a2 s .c o m*/ addContainerListeners(c, objs); AncestorListener ancestorListener = search(objs, AncestorListener.class); VetoableChangeListener vetoableChangeListener = search(objs, VetoableChangeListener.class); if (ancestorListener != null) c.addAncestorListener(ancestorListener); if (vetoableChangeListener != null) c.addVetoableChangeListener(vetoableChangeListener); }