[RSS]

Lightweight and Heavyweight Patch in JDK1.7

Lightweight and Heavyweight Integration has been a problem since the introduction of Swing components. OpenJDK has implemented a fix that is limited in scope to one class and makes no API changes ( it can be viewed in jdk7.0 build sources j2se/src/share/classes/java/awt/Component.java b22 entitled "MIXING CODE"). It allows for the mixing of lightweight components (ie swing) and heavyweight ( ie awt ) in one application without the ZOrdering issues previously seen.. The solution relies on the cutting of any native window regions in which an opaque lightweight component has a greater Z order.

A little history if needed:
In the past, these two components did not play nicely primarily due seen in Z-Ordering issues (http://java.sun.com/products/jfc/tsc/articles/mixing/index.html). For Mac, this isn't visible in popups like other platforms(since Cocoa uses heavyweight popups), but is visible when other lightweight components are be placed on top (ie transparent or opaque panels). With this patch, the Java developer can now embed native applications which provides a slew of opportunities for all java developers.

We are excited about this 1.7 fixes/feature and would like to begin using these new capabilities in future Netbeans releases. Unfortunately, we can not expect developers to jump on the latest and greatest Java release so a Netbeans dependency on 1.7 is out of the question. After discussions with Oleg and Artem, they said that back-porting this patch to 1.6 and 1.5 would require minimal effort but would need management approval. Again, there are no API changes and the fix is scoped to small area with the Component class. If our JDK team is willing to commit to back-porting this feature to 1.5 and 1.6, we can move forward and create Netbeans feature dependencies on this patch. Also, the sooner this patch is released, the sooner it will propagate into the Apple based Java update. It seems time is of the essence.