-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.1.5
-
x86
-
windows_95, windows_nt
On Solaris if you have a window on which non-standard cursors have
been set on AWT components and you disable the window, the components
are disabled but the cursors remain as the programmer specified.
However on win32 when you disable a window, any
cursor - eg busy cursor - you set on the window or any components
in the window is not honoured.
It reverts to the standard Windows arrow.
The problem here is that this is inconsistent with the behaviour exhibited on Solaris.
Test case :
import java.awt.*;
public class CursorTest extends Frame
{ Button b;
Panel p;
public CursorTest()
{
p = new Panel();
setLayout(new FlowLayout());
p.add(b=new Button("Button1"));
p.add(new Label("Label1"));
p.add(new Checkbox("Checkbox"));
p.add(new TextField("Button1"));
add("Center",p);
pack();
reshape(100,100,300, 400);
show();
p.setCursor(new Cursor(Cursor.WAIT_CURSOR));
b.setCursor(new Cursor(Cursor.WAIT_CURSOR));
setCursor(new Cursor(Cursor.WAIT_CURSOR));
Toolkit.getDefaultToolkit().sync();
disable();
}
public static void main(String[] args)
{
new CursorTest();
}
}
been set on AWT components and you disable the window, the components
are disabled but the cursors remain as the programmer specified.
However on win32 when you disable a window, any
cursor - eg busy cursor - you set on the window or any components
in the window is not honoured.
It reverts to the standard Windows arrow.
The problem here is that this is inconsistent with the behaviour exhibited on Solaris.
Test case :
import java.awt.*;
public class CursorTest extends Frame
{ Button b;
Panel p;
public CursorTest()
{
p = new Panel();
setLayout(new FlowLayout());
p.add(b=new Button("Button1"));
p.add(new Label("Label1"));
p.add(new Checkbox("Checkbox"));
p.add(new TextField("Button1"));
add("Center",p);
pack();
reshape(100,100,300, 400);
show();
p.setCursor(new Cursor(Cursor.WAIT_CURSOR));
b.setCursor(new Cursor(Cursor.WAIT_CURSOR));
setCursor(new Cursor(Cursor.WAIT_CURSOR));
Toolkit.getDefaultToolkit().sync();
disable();
}
public static void main(String[] args)
{
new CursorTest();
}
}
- duplicates
-
JDK-4145822 setCursor fails when invoked before or after setEnabled
- Closed
- relates to
-
JDK-4237926 Setting cursor for a disabled component sets it to the parent as well.
- Closed