Documentos de Académico
Documentos de Profesional
Documentos de Cultura
In For Me Cuento
In For Me Cuento
TEMA:
Interfaz gráfica de usuario (GUI)
OBJETIVO:
Aplicar las sentencias de estructura de control en la resolución de problemas mediante
NetBeans IDE
RESULTADOS DE APRENDIZAJE
Aplica y ejecuta Applet en el contexto de programa java para la creación de aplicaciones
educativas
ACTIVIDADES:
Planteamiento de problemas
Resolución en parejas
DESARROLLO DE CONTENIDOS
Crear un cuento
package cuento;
import javax.swing.JOptionPane;
/**
* @author LAB3_INFOR_PC120
*/
public class contraseña1 extends javax.swing.JFrame {
String user11="bryan", pass11="bryan97", user22="steven", pass22="hola123";
String user1, pass1;
/**
* Creates new form contraseña1
*/
public contraseña1() {
initComponents();
this.setLocationRelativeTo(null);
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
UNIVERSIDAD CENTRAL DEL ECUADOR
FACULTAD FILOSOFÍA, LETRAS Y CIENCIAS DE LA EDUCACIÓN
PEDAGOGÍA DE LAS CIENCIAS EXPERIMENTALES - INFORMÁTICA
Periodo Académico: octubre 2017 - marzo 2018
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jButton1.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/cuento/login.PNG"))); // NOI18N
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jButton1.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyPressed(java.awt.event.KeyEvent evt) {
jButton1KeyPressed(evt);
}
});
jLabel1.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/cuento/vector-dark-login-ui-design-
template.jpg"))); // NOI18N
.addGroup(layout.createSequentialGroup()
.addGap(120, 120, 120)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE,
140, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(130, 130, 130)
.addComponent(user, javax.swing.GroupLayout.PREFERRED_SIZE, 240,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jLabel1)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(250, 250, 250)
.addComponent(pss_, javax.swing.GroupLayout.PREFERRED_SIZE, 30,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(20, 20, 20)
.addComponent(jButton1))
.addGroup(layout.createSequentialGroup()
.addGap(190, 190, 190)
.addComponent(user, javax.swing.GroupLayout.PREFERRED_SIZE, 30,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jLabel1)
);
pack();
}// </editor-fold>
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code
(optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look
and feel.
* For details see
http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(contraseña1.class.getName()).log(java.util.logging
.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(contraseña1.class.getName()).log(java.util.logging
UNIVERSIDAD CENTRAL DEL ECUADOR
FACULTAD FILOSOFÍA, LETRAS Y CIENCIAS DE LA EDUCACIÓN
PEDAGOGÍA DE LAS CIENCIAS EXPERIMENTALES - INFORMÁTICA
Periodo Académico: octubre 2017 - marzo 2018
java.util.logging.Logger.getLogger(contraseña1.class.getName()).log(java.util.logging
.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(contraseña1.class.getName()).log(java.util.logging
.Level.SEVERE, null, ex);
}
//</editor-fold>
}
UNIVERSIDAD CENTRAL DEL ECUADOR
FACULTAD FILOSOFÍA, LETRAS Y CIENCIAS DE LA EDUCACIÓN
PEDAGOGÍA DE LAS CIENCIAS EXPERIMENTALES - INFORMÁTICA
Periodo Académico: octubre 2017 - marzo 2018
BIBLIOGRAFÍA:
Flórez Fernández, Héctor Arturo (2012). Programación Orientada a Objetos usando
JAVA
Sr(a). MSc.
ESTUDIANTE DOCENTE