ArkaLlop - Clon del Arkanoid

Llop Site Home > JAVA > ArkaLlop > Componentes personalizados

Componentes personalizados:

Clase ArkaButton

package arkallop;

import java.awt.*;
import javax.swing.*;

/** Título: ArkaLlop
    Descripción: Prácticas capítulo 11, ejercicio 4
    Copyright: Copyright (c) 2005
    Empresa: Casa_Llop
    @author Albert_Lobo
    @version 1.0 */

/** Clase que personaliza 'JButton'. */
public class ArkaButton extends JButton
{
  public ArkaButton ()
  {
    // Lamada al constructor de la superclase, le ponemos la fuente 'Beyond Wonderland' de color
    // rojo, y le damos un tamaño de 55 x 30 píxels.
    super ();
    setFont (ArkaLlop.getFuenteBeyondWonderland ());
    setForeground (Color.red);
    setSize (55, 30);
  }
}



Clase ArkaLabel

package arkallop;

import java.awt.*;
import javax.swing.*;

/** Clase que personaliza 'JLabel'. */
public class ArkaLabel extends JLabel
{
  public ArkaLabel ()
  {
    // Lamada al constructor de la superclase, le ponemos la fuente 'Beyond Wonderland' de color
    // rojo, y centramos el texto.
    super ();
    setFont (ArkaLlop.getFuenteBeyondWonderland ());
    setForeground (Color.red);
    setHorizontalAlignment (CENTER);
  }
}

¿Comentarios, sugerencias?: llopsite.at.yahoo.es | © 2005-07 Albert Lobo

Última actualización: 18-Feb-2007

Hosted by www.Geocities.ws

1