All pastes #470387 Raw Edit

zuzu

public java v1 · immutable
·published 2007-05-04 07:39 UTC
rendered paste body
class UnMobile extends JPanel implements Runnable{	int saLargeur, saHauteur, sonDebutDessin;	final int sonPas=10, sonTemps=500, sonCote=40;		UnMobile (int telleLargeur, int telleHauteur)	{		super();		saLargeur=telleLargeur;		saHauteur=telleHauteur;		setSize(telleLargeur,telleHauteur);	}//UnMobile			public void run()	{		for (sonDebutDessin=0;sonDebutDession<saLargeur-sonPas;sondebutDessin+=sonPas)		{			repaint();			try			{				Thread.sleep(sonTemps)			}//try						catch (InterruptedException telleExcp)			{				telleExcp.printStackTrace();			}//catch		}//for	}//run		public void paintComponent (Graphics telContexteGraphique)	{		super.paintComponent(telContexteGraphique);		telContexteGraphique.filleRect(sonDebutDessin,saHauteur/2,sonCote, sonCote);	}//paintComponent}//class