-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
None
-
1.0.2, 1.1
-
generic, sparc
-
generic, solaris_2.4
Currently, if a container is disabled, it does not recursively call disable() on
its child components, even though any child peer components will in fact
become disabled (buttons, fields, etc). Where this is a particular problem is
when Canvas is subclassed to create a custom component -- in this case
it will not be disabled properly when its container is disabled.
=============================
###@###.### 1997-12-09
BugID: 4032770 info:
Enabling (by setEnable) container which containes disabled components
doesn't effect such components and the label of those components still remains
grayed out on SOlaris but Windows.
On Windows enabling container results to change looking of components, those
looks like enabled but disabled in fact.
import java.awt.*;
import java.applet.*;
public class Flush2 extends Applet {
Choice choice1;
public void init() {
Button b = new Button("B") ;
add (choice1 = new Choice ());
add (b) ;
choice1.addItem (" black ");
b.setEnabled(true) ;
choice1.setEnabled(true) ;
this.setEnabled(false) ;
}
public boolean handleEvent(Event evt) {
if (evt.id == Event.ACTION_EVENT && evt.target instanceof Button) {
System.out.println("action!") ;
}
return true ;
}
}
File Flush2.html
<html>
<head>
<title>Test</title>
</head>
<body>
<APPLET CODE="Flush2.class" WIDTH=480 HEIGHT=240></APPLET>
</body>
</html>
===========
On win32 run two applets at the same time to see the difference . One with this.setEnable(false) and other with this.setEnable(true) or comment out this line. There is no difference between them.
its child components, even though any child peer components will in fact
become disabled (buttons, fields, etc). Where this is a particular problem is
when Canvas is subclassed to create a custom component -- in this case
it will not be disabled properly when its container is disabled.
=============================
###@###.### 1997-12-09
BugID: 4032770 info:
Enabling (by setEnable) container which containes disabled components
doesn't effect such components and the label of those components still remains
grayed out on SOlaris but Windows.
On Windows enabling container results to change looking of components, those
looks like enabled but disabled in fact.
import java.awt.*;
import java.applet.*;
public class Flush2 extends Applet {
Choice choice1;
public void init() {
Button b = new Button("B") ;
add (choice1 = new Choice ());
add (b) ;
choice1.addItem (" black ");
b.setEnabled(true) ;
choice1.setEnabled(true) ;
this.setEnabled(false) ;
}
public boolean handleEvent(Event evt) {
if (evt.id == Event.ACTION_EVENT && evt.target instanceof Button) {
System.out.println("action!") ;
}
return true ;
}
}
File Flush2.html
<html>
<head>
<title>Test</title>
</head>
<body>
<APPLET CODE="Flush2.class" WIDTH=480 HEIGHT=240></APPLET>
</body>
</html>
===========
On win32 run two applets at the same time to see the difference . One with this.setEnable(false) and other with this.setEnable(true) or comment out this line. There is no difference between them.
- duplicates
-
JDK-4032770 Effect on components differs between Win32/Solaris by setEnable
-
- Closed
-