Ganar.java

Categorías: CategoryJava | CategoryProgramacion

   1 /*
   2  * To change this template, choose Tools | Templates
   3  * and open the template in the editor.
   4  */
   5 package savetheearthsk;
   6 
   7 import java.awt.Color;
   8 import java.awt.Font;
   9 import java.awt.Graphics;
  10 
  11 /**
  12  * @author lina maria bermudez
  13  * @author mario nicolas arcila
  14  */
  15 /**
  16  * LA clase Ganar es aquella que nos va a pintar el texto
  17  * que usaremos apenas el jugador gane
  18  *
  19  */
  20 public class Ganar extends ObjetoGrafico {
  21 
  22     int cantidad;
  23     private Lienzo lienzo;
  24 
  25     /**
  26      *
  27     @param x es la ubicacion en X
  28     @param y es la posicion en Y
  29     @param ancho es el ancho de la calavera
  30     @param alto es el alto de la calavera
  31      */
  32     public Ganar(int x, int y, int ancho, int alto) {
  33         super(x, y, ancho, alto);
  34 
  35     }
  36 
  37     /**
  38      * Metodo Para pintar el texto de Ganaste
  39      * @param g  es la clase base para todo contexto grafico
  40      */
  41     public void paint(Graphics g) {
  42 
  43 
  44 
  45         g.setColor(new Color(255, 0, 0));
  46         g.setFont(new Font("Arial", Font.BOLD, 60));
  47         g.drawString("Ganaste", x, 470);
  48 
  49 
  50 
  51     }
  52 }

Java/Programas/SaveTheEarth/Ganar.java (last edited 2010-10-28 11:31:43 by Nicolas Arcila)