Web hosting ecommerce - Java Swing - O Reilly SecretTest st = new
Java Swing - O Reilly SecretTest st = new SecretTest(); st.setVisible(true); } } If you have set up your own event source components before, the EventListenerList class may not seem to provide much improvement. But, as the documentation points out, it provides a single access point for serializing your list of listeners. 27.3.1.1 Field protected transient java.lang.Object[] listenerList This field holds the list of class types and listeners. 27.3.1.2 Constructor public EventListenerList() Creates a new listener list. 27.3.1.3 Listener Methods public synchronized void add(Class t, EventListener l) Adds a new listener to the list of listeners. It is synchronized, in an effort to make this class as thread-safe as possible. public int getListenerCount() public int getListenerCount(Class t) Return a count of how many listeners are contained in the list. If a Class argument is provided, you get the number of listeners of that type in the list. public Object[] getListenerList() Returns an array of objects organized as in Figure 27.4. The listener type entry is always a Class object. You typically work through this array in increments (or decrements) of 2. Figure 27.4. The EventListenerList object array structure public synchronized remove(Class t, EventListener l) - 930
In case you need quality webspace to host and run your web applications, try our personal web hosting services.