1 / 7

Leer teclado

Leer teclado. Leer un e ntero tecleado por el usuario: a = Integer.parseInt (jTextField1.getText()); Leer un double tecleado por el usuario: a = Double.parseDouble (jTextField1.getText());. Hacer que el resultado aparezca en un textfield. jTextField3.setText( String.valueOf (c));.

kesia
Télécharger la présentation

Leer teclado

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Leer teclado • Leer un entero tecleado por el usuario: a = Integer.parseInt(jTextField1.getText()); • Leer un double tecleado por el usuario: a = Double.parseDouble(jTextField1.getText()); MTRA. CAROLINA GALAVIZ INZUNZA CBTIS37

  2. Hacer que el resultado aparezca en un textfield • jTextField3.setText(String.valueOf(c)); MTRA. CAROLINA GALAVIZ INZUNZA CBTIS37

  3. Crear un login con MySQL • Crear una tabla en mysql de usuarios • Crear una tabla de alumnos • Crear una clase llamada: “Acceso” • Crear un nuevo formulario: “FrmAcceso”. • Crear un nuevo formulario en SWING GUI FRAME-MDI APLICATION SAMPLE FORM, llamarlo: “FrmMenu”. • Agregar un nuevo menu y ponerle “mostrar datos usuario”. MTRA. CAROLINA GALAVIZ INZUNZA CBTIS37

  4. Seleccionar una imagen para tu programa • Insertar una etiqueta, luego en propiedades elegir “icon”. MTRA. CAROLINA GALAVIZ INZUNZA CBTIS37

  5. Ir a la clase acceso para crear la conexión. • Importar importjava.sql.*; • Crear un metodo publico de tipo void llamado acceso que recibe los 2 parametros de la BD id y contrasena. • Se copia y adapta el codigo para la conexión. • Se da clic en el botón y se invoca a la clase de la conexión. MTRA. CAROLINA GALAVIZ INZUNZA CBTIS37

  6. Codigo //De double a String cadena = String.valueOf(valor); //De String a double otroValor = Double.parseDouble(cadena);  MTRA. CAROLINA GALAVIZ INZUNZA CBTIS37

  7. Hacer ejecutable 1) Clic aquí 2) Aparece un cuadro de dialogo elegir: 2) Ruta, copiar el archivo MTRA. CAROLINA GALAVIZ INZUNZA CBTIS37

More Related