You are on page 1of 2

/*

StakkaPanel.java
Autores:
Luis 10382
Luis Pedro 10073
Jose M. 10784
20 de noviembre de 2010
Descripcion: contiene los label para mostrar testos.
*/
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.text.DecimalFormat;
public class StakkaPanel extends JPanel{
//Atributos
protected JLabel punteo, nombre, imagen, titulo, mensaje;
private String a;

public StakkaPanel(String nombreJ){


Font font = new Font("Arial Narrow",Font.BOLD, 24);
Font font2 = new Font("Arial Narrow",Font.BOLD, 64);
punteo = new JLabel(" Tienes pocos segundos! apresurate!");
punteo.setFont(font);
mensaje = new JLabel(" BIENBENIDO ");
mensaje.setFont(font);
titulo = new JLabel(" Stakka !!");
titulo.setFont(font2);
titulo.setForeground(Color.white);
if(System.getProperty("os.name").toLowerCase().startsWith("windo
ws"))
a = (".\\Imagenes\\");
else
a =("./Imagenes/");
imagen = new JLabel(new ImageIcon(a+"nada.jpg"));

nombre = new JLabel("Nombre: "+ nombreJ);


nombre.setFont(font);

//Agregar componentes a StakkaPanel


add(titulo);
add(nombre);
add(punteo);
add(imagen);
add(mensaje);
setBackground(Color.blue);
setPreferredSize(new Dimension(600, 600));
}
//Metodo para reiniciar objetos y variables del juego.
//No recibe ni devuelve valores.
public void reiniciar(){
punteo.setText(" Tienes pocos segundos! apresurate!");
mensaje.setText(" BIENVENIDO !");

}
}

You might also like