-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
None
-
1.2.2, 1.3.0
-
x86
-
windows_nt
Name: dsC76792 Date: 05/13/99
###@###.###
The problem exists in JDK1.2.2P,Q, 1.3A,C and the current
Kestrel build.
On Win32:
When a component with non-default cursor is disabled
its cursor gets propagated to the parent.
I cannot reproduce this with JDK1.3B: the component's
and the parent's cursors do not change.
With JDK1.2.1A disabled component displays parents
cursor (see #4145822, #4100815).
On both Solaris and Win32:
When a cursor is set for java.awt.Choice
it is always set to the parent as well.
The test case:
-------------------------------------------------------------
import java.awt.*;
import java.awt.event.*;
public class Test extends WindowAdapter {
public static void main(String args[]) {
Frame frame = new Frame("Frame");
frame.setLayout(new GridLayout(4,1));
frame.add(new TestPanel(new List()));
frame.add(new TestPanel(new TextField("TextField")));
frame.add(new TestPanel(new Label("Label")));
frame.add(new TestPanel(new Choice()));
frame.addWindowListener(new Test());
frame.pack();
frame.setVisible(true);
}
public void windowClosing(WindowEvent e) {
System.exit(0);
}
}
class TestPanel extends Panel implements ItemListener {
Component target;
Checkbox toggleEnabled = new Checkbox("enabled", true);
public TestPanel(Component component) {
super();
target = component;
setLayout(new GridLayout(1,2));
add(target);
target.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
toggleEnabled.addItemListener(this);
add(toggleEnabled);
}
public void itemStateChanged(ItemEvent e) {
target.setEnabled(!target.isEnabled());
}
}
---------------------------------------------------------------------
======================================================================
- relates to
-
JDK-4100815 Java 1.1.x win32 cursors set on disabled window not honoured
- Closed
-
JDK-4145822 setCursor fails when invoked before or after setEnabled
- Closed