View Single Post
  #1 (permalink)  
Old 03-16-2008, 06:18 PM
ofir3dvb ofir3dvb is offline
Member
 
Join Date: Mar 2008
Posts: 3
ofir3dvb is on a distinguished road
Image with JWindow -> trails
Hi all !

First let me apologize for my bad english.
Secondly, I tried to show on the screen transpaernt animated gif, in another words, sprite(character) which walk on the desktop, well, i succsed, but there is a problem, if the sprite move is head, then on the screen you will see the sprite before and after the movmenet, there are trails.


for those who not understand the problem:




my code very simple at this moment:

public class WS extends JWindow
{
Image img=null;
Image img2=null;
Toolkit tk=null;
public WS()
{
tk=Toolkit.getDefaultToolkit();
this.setSize(500, 500);
this.setLocation(500, 500);
img2=tk.getImage("MijalNo.gif");

this.prepareImage(img2, null);

this.setVisible(true);

}


public void paint(Graphics g)
{
g.drawImage(img2, 0, 0, this);
}
}


i hope that you could help me.
thank you.

Last edited by ofir3dvb : 03-16-2008 at 06:21 PM.
Reply With Quote
Sponsored Links