X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2Fplat%2FAWT.java;h=771bdbb72bed80baec1e32b3cf356a31ee0c6cea;hb=31aeacd9a704133e2c74f42a46fb6798a447ce40;hp=3dfd1536a96b037ec7c48ced9e0103dbbec46d5f;hpb=4963611978625d087561f5a669a0ba93a04bd1ba;p=org.ibex.core.git diff --git a/src/org/xwt/plat/AWT.java b/src/org/xwt/plat/AWT.java index 3dfd153..771bdbb 100644 --- a/src/org/xwt/plat/AWT.java +++ b/src/org/xwt/plat/AWT.java @@ -131,7 +131,15 @@ public class AWT extends JVM { mediatracker.addImage(img, 1); try { mediatracker.waitForAll(); } catch (InterruptedException e) { } mediatracker.removeImage(img); - this.i = img; + synchronized(AWTPixelBuffer.class) { + if (AWTPixelBuffer.component == null) { + AWTPixelBuffer.component = new Frame(); + AWTPixelBuffer.component.setVisible(false); + AWTPixelBuffer.component.addNotify(); + } + } + this.i = AWTPixelBuffer.component.createImage(w, h); + this.i.getGraphics().drawImage(img, 0, 0, null); } }