You are on page 1of 5

TECNM - TOPICOS AVANZADOS DE PROGRAMACIÓN – UNIDAD II

Unidad 2 - Componentes y librerías.


PRÁCTICA 2.1:
Utilizando los Componentes JFrame, JButton, JLabel
y JTextField.
OBJETIVO
Crear un programa en Java con Netbeans que implemente componentes básicos.

COMPETENCIAS ESPECÍFICAS
Diseña e implementa componentes y librerías para lograr la reutilización de código.

DESARROLLO
1.- Creamos nuevo proyecto

I.S.C. ALFREDO VALLE HERNÁNDEZ 1


TECNM - TOPICOS AVANZADOS DE PROGRAMACIÓN – UNIDAD II

2.- Agregamos formulario JFrame

I.S.C. ALFREDO VALLE HERNÁNDEZ 2


TECNM - TOPICOS AVANZADOS DE PROGRAMACIÓN – UNIDAD II

3.- Realizamos la interfaz conforme a la imagen.

I.S.C. ALFREDO VALLE HERNÁNDEZ 3


TECNM - TOPICOS AVANZADOS DE PROGRAMACIÓN – UNIDAD II

4.- Agregamos las librerías en el código del JFrame

5.- Escribimos código después de la clase

6.- Escribimos el código en el evento click del botón AGREGAR

I.S.C. ALFREDO VALLE HERNÁNDEZ 4


TECNM - TOPICOS AVANZADOS DE PROGRAMACIÓN – UNIDAD II

7.- Ejecutamos la aplicación y observamos el resultado.

I.S.C. ALFREDO VALLE HERNÁNDEZ 5

You might also like