Vous êtes ici :
> > >
Montre en java
 | SCRIPT APPLETS-JAVA MONTRE EN JAVA v 1.0.0 |
Horloge réaliséee en Java. Le script utilise les interface graphiques et un peu de java avancé avec les threads.
|
/*****auteur AREF ZINE LABIDINE***/ /*****ELEVE INGENIEUR EN INFORMATIQUE ET TELECOM***/ /***** A L'INPT AU MAROC*****/ /***** E-MAIL: zinelabidine_inpt@hotmail.com*****/ /***** telephone:(+212)78314576****/ import javax.swing.*; import java.awt.*; public class Montre extends JFrame{ static int sec=0,min=0,h=0; g.fillRect(40,150,60,30); g. setColor(Color. YELLOW); g.fillRect(100,150,60,30); g.fillRect(160,150,60,30); g. drawString(String. valueOf(sec ), 180, 165); g. drawString(String. valueOf(min ), 120, 165); g. drawString(String. valueOf(h ), 60, 165); } public void run(){ //Thread th2=new Thread(); //Thread th3=new Thread(); th1.start(); repaint(); -
try{ th1.sleep(1000); } if((sec==59)&&(min<59)){ sec=-1; min++; } if((sec==59)&&(min==59)&&(h<23)){ sec=-1; min=0; h++; } if((h==23)&&(min==59)&&(sec==59)){ -
sec=-1; min=0; h=0;} sec++; } public static void main (String[] args ){ Montre fen=new Montre(); fen.setTitle("montre en java"); fen.setSize(500,300); fen.setVisible(true); while(true){ -
fen.run(); } } }
|
| Auteur |
|
| Date de publication |
09/05/2007 |
| Langue |
français |
| Type de licence |
gratuit |
| Licence |
GNU |
| Bases de données |
Aucune |
| Téléchargements total |
3 297 |
| Téléchargements ce mois |
147 |
|
Note des utilisateurs |
|
Fonctionnalités Interface Stabilité Installation Rapport qualité/prix Avis général |
Nbre d'avis : 0
|
|
|
 | DERNIERS AVIS POSTÉS PAR LES UTILISATEURS |