Why doesn't java.awt.Component enable PAINT_EVENT_MASK by default?
Scott Gilbertson
scottg@mantatest.com
Mon Feb 3 21:11:00 GMT 2003
In version 3.2, java.awt.Component.eventMask contained
AWTEvent.PAINT_EVENT_MASK by default. In 3.2.1 and the 3.3 branch, it
doesn't. On my copy of 3.3, I've put it back, because otherwise lightweight
components which work in the Sun JRE don't paint anything with GCJ. In CVS,
I could only find the change listed as "AWT/Swing merge from GNU Classpath"
(revision 1.21) and "Mainline merge as of 2002年08月11日 (revision 1.20.2.1).
Does anyone know why this mask bit was removed and/or whether it would be OK
to put it back?
Here's the post-3.2 code, which doesn't work:
long eventMask = AWTEvent.INPUT_ENABLED_EVENT_MASK;
and here's what I'm using, which works:
long eventMask = AWTEvent.INPUT_ENABLED_EVENT_MASK |
AWTEvent.PAINT_EVENT_MASK;
More information about the Java
mailing list