+2003-04-20 Scott Gilbertson <scottg@mantatest.com>
+
+ * java/awt/Container.java (addImpl): Enable paint events if adding
+ a lightweight to a heavyweight.
+ (addNotify): Ensure that peer is created before
+ addNotifyContainerChildren.
+ (addNotifyContainerChildren): Enable paint events if a heavyweight
+ container contains a lightweight.
+
2003-04-20 Tom Tromey <tromey@redhat.com>
* java/io/BufferedReader.java, java/io/BufferedWriter.java,
if (peer != null)
{
comp.addNotify();
-
- if (comp.isLightweight())
- enableEvents(comp.eventMask);
+
+ if (comp.isLightweight ())
+ {
+ enableEvents (comp.eventMask);
+ if (!isLightweight ())
+ enableEvents (AWTEvent.PAINT_EVENT_MASK);
+ }
}
invalidate();
*/
public void addNotify()
{
- addNotifyContainerChildren();
super.addNotify();
+ addNotifyContainerChildren();
}
/**
for (int i = ncomponents; --i >= 0; )
{
component[i].addNotify();
- if (component[i].isLightweight())
- enableEvents(component[i].eventMask);
+ if (component[i].isLightweight ())
+ {
+ enableEvents(component[i].eventMask);
+ if (peer != null && !isLightweight ())
+ enableEvents (AWTEvent.PAINT_EVENT_MASK);
+ }
}
}
}