36
VINCULAR UNA BD DESDE MySQL CON NETBEANS. DSAUPOO CBTIS 37

VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc

  • Upload
    trannga

  • View
    226

  • Download
    4

Embed Size (px)

Citation preview

Page 1: VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc

VINCULAR UNA BD

DESDE MySQL CON

NETBEANS.

DSAUPOO

CBTIS 37

Page 2: VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc

*Ir a la pestaña Tools en la barra

de arriba y elegir, Ant libraries

Page 3: VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc

*Seleccionar la opción

MySQL JDBC Driver

Page 4: VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc
Page 5: VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc

Introducir la contraseña

“123456”

Page 6: VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc

Finish

Page 7: VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc

MySQL server, ahora

aparece en Databases

Page 8: VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc

Clic derecho en las B.D que

utilizaremos, y conectar

Page 9: VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc

Crear un nuevo proyecto

Page 10: VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc

Java> Java Aplication

Page 11: VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc

Introducir nombre

Page 12: VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc

Clic derecho proyectofinal

Page 13: VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc

Se crea un Jframe Form

Page 14: VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc

*Seleccionamos Tabbed pane,

y un panel dentro de el

Page 15: VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc

*Clic derecho

proyectofinal>new>other

Page 16: VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc

*Swing GUI Forms>

Master/Detail sample form

Page 17: VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc

*Asignamos un nombre

Page 18: VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc

*Seleccionamos las bases

de datos

Page 19: VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc

*Seleccionamos la tabla

Page 20: VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc

Finish

Page 21: VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc

Se crea todo un diseño grafico

para esa base de datos

Page 22: VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc

Realizamos el mismo proceso

para otra base de datos

Page 23: VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc

Asignamos un nombre

Page 24: VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc

Seleccionamos la base de

datos

Page 25: VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc

Finish

Page 26: VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc

*Vamos a la primera pestaña

que se creo (en este caso

ProyectoFinal)

Page 27: VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc

*Colocamos el siguiente

comando: menuprincipal frm =

new menuprincipal();

frm.setVisible(true);

Page 28: VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc

*Copiamos los JFrames de las

bases de datos importadas

Page 29: VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc

*Y las copiamos en la parte de

menú principal, dentro de

JTabbed Panel

Page 30: VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc

*Copiamos la siguiente

Page 31: VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc

*E igualmente la pegamos

dentro de JTabbed Panel

Page 32: VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc

Colocamos un botón, y lo

nombramos “Salir”

Page 33: VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc

Doble clic a el, y colocamos

el siguiente comando

this.dispose();

Page 34: VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc

Corremos el JFrame

menuprincipal

Page 35: VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc
Page 36: VINCULAR UNA BD DESDE MySQL CON NETBEANS. 7.3 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Library Name: MySQL JDBC Driver Classpath Sources Javadoc