-
Bug
-
Resolution: Fixed
-
P3
-
1.3.0
-
kestrel
-
sparc
-
solaris_2.5.1
Name: aaC67449 Date: 07/21/99
The JToolBar.createActionChangeListener() always returns null, but should
returns "a properly configured PropertyChangeListener".
See javadocs:"
protected PropertyChangeListener createActionChangeListener(JButton b)
Returns a properly configured PropertyChangeListener which updates the control as changes
to the Action occur. As of 1.3, this is no longer the preferred method, instead it is
recommended to configure a control with an action using setAction(), and then adding that
control directly to the Container.
"
This is incompatible change and the behavior of the method should be restored.
-------------example -------------
import javax.swing.*;
import java.beans.*;
public class Test {
public static void main(String argv[]) {
StubJToolBar c=new StubJToolBar();
if(c.stubCreateActionChangeListener(new JButton())!=null) {
System.out.println("Passed");
} else {
System.out.println("Method returns null");
}
}
}
class StubJToolBar extends JToolBar {
public PropertyChangeListener stubCreateActionChangeListener(JButton b){
return createActionChangeListener(b);
}
}
-------------JDK-1.3-K output ---------------
Method returns null
-------------jdk1.2.2 output ---------------
Passed
======================================================================