I want to display an image in a frame but my image isn't displayed. I know this has been discussed already but it stil wasn't clear to me. Thanks!
posted 13 years ago
[/qb]<hr></blockquote> Use java.awt.MediaTracker to wait till the complete image is laoded : img = Toolkit.getDefaultToolkit().getImage("kerst.jpg"); MediaTracker mt=new MediaTracker(this); mt.addImage(img,0); mt.waitForID(0); setSize(500,500); setVisible(true); That should solve your problem. Tanveer [ February 20, 2004: Message edited by: Tanveer Rameez ]
Author of JPhotoBrush Pro (www.jphotobrushpro.com)