-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
1.3.0
-
None
-
sparc
-
windows_nt
Running "jdk1.3.0rc1-T" on Windows NT ServicePack6a an abstract button generates
a change event when the mouse passes over a JButton. This behaviour is not
exhibited on "1.3beta-0" on Solaris Sparc.
The following test code illustrates the problem :
// java import
import java.awt.*;
import javax.swing.*;
import javax.swing.event.*;
//
public class Test extends JFrame implements ChangeListener {
private JButton b1, b2;
public Test () {
super("Test");
getContentPane().setLayout(new FlowLayout());
getContentPane().add(b1 = new JButton("b1"));
b1.addChangeListener(this);
getContentPane().add(b2 = new JButton("b2"));
b2.addChangeListener(this);
pack();
setVisible(true);
}
public void stateChanged(ChangeEvent e) {
System.out.println("Should not get this event unless a button is clicked --->");
}
public static final void main(String args[]) {
Test t = new Test();
}
}
a change event when the mouse passes over a JButton. This behaviour is not
exhibited on "1.3beta-0" on Solaris Sparc.
The following test code illustrates the problem :
// java import
import java.awt.*;
import javax.swing.*;
import javax.swing.event.*;
//
public class Test extends JFrame implements ChangeListener {
private JButton b1, b2;
public Test () {
super("Test");
getContentPane().setLayout(new FlowLayout());
getContentPane().add(b1 = new JButton("b1"));
b1.addChangeListener(this);
getContentPane().add(b2 = new JButton("b2"));
b2.addChangeListener(this);
pack();
setVisible(true);
}
public void stateChanged(ChangeEvent e) {
System.out.println("Should not get this event unless a button is clicked --->");
}
public static final void main(String args[]) {
Test t = new Test();
}
}
- duplicates
-
JDK-4323121 Any Created Button that extends JButton returns TRUE for getModel().isArmed()
- Resolved