Last revised: April 02, 2006
Notas de Clase Para Curso de Programacion: Applets
Andrés Montano Pellegrini


Next: Creando, Dibujando y Organizando Componentes Up: Contenido Previous: Introduccion a HTML

B. Introduccion a Applets

  1. Revisitando el Applet Hello World!
  2. Dibujando con Graphics
    • fillOval(x,y,height, width)
    • fillRect()
    • drawOval()
    • drawLine()
  3. Escribiendo con Graphics
    • Font f = new Font ("TimesRoman", Font.PLAIN, 12);
    • Graphics tiene:
      • Font getFont();
      • void setFont (Font f);
    • Para calcular posiciones tomando en cuenta los tamaños del font: FontMetrics
      • Graphics tiene un metodo getFontMetrics()
      • FontMetrics tiene: stringWidth, getHeight (getLeading: espacio entre lineas + getAscent: parte superior de letra + getDescent: cola de letra)


Next: Creando, Dibujando y Organizando Componentes Up: Contenido Previous: Introduccion a HTML


Last revised: December 13, 2006
Copyright © 2001-2006 by Andrés Montano Pellegrini
All rights reserved