Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

help with a image animation applet

Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi i'm makeing an simple animation applet useing differnt
gif's but when I try to run it it says
java.lang.IllegalArgumentException: adding a window to a container
at java.awt.Container.addImpl(
at java.awt.Container.add(
at AtlanticFlameLogo.init(

heres the code for it , plase help
public class AtlanticFlameLogo extends JApplet implements Runnable
private URL logoFile ;
private Image logo;
private Thread runner = null;
private Color bgColor = new Color(0,0,0);
private Graphics g;

public void init()
logoFile = new URL("//");
}catch(MalformedURLException e)
{ }
}/* End of public void init() */

public void start()
runner = new Thread(this);
}/* End of public void start() */

public void stop()
runner = null;
} /* End of public stop */

public void destroy()
logoFile = null;
logo = null;
bgColor = null;
}/* End of public void destroy */

public void run()
Thread runingT = Thread.currentThread();
while(runingT == runner);
for(int i = 0 ; i < 12 ; i++)
logo = getImage(logoFile ,"img"+i+".gif");
}//end of for
catch(InterruptedException e)
{ }//end of catch
}//end of public void run

public void paint(Graphics g)
g.drawImage(logo, 0 ,0 ,this);
}// End of public void paint(Grahpics g)

}//end of applet
[This message has been edited by hennie louw (edited July 03, 2001).]
You didn't tell me he was so big. Unlike this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic