Facebook
From Eratic Ibis, 2 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 99
  1. /*
  2.  * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
  3.  * Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JFrame.java to edit this template
  4.  */
  5. package com.mycompany.teleamiguis;
  6.  
  7. /**
  8.  *
  9.  * @author gyron
  10.  */
  11. public class Login extends javax.swing.JFrame {
  12.  
  13.     /**
  14.      * Creates new form Login
  15.      */
  16.     public Login() {
  17.         initComponents();
  18.     }
  19.  
  20.     /**
  21.      * This method is called from within the constructor to initialize the form.
  22.      * WARNING: Do NOT modify this code. The content of this method is always
  23.      * regenerated by the Form Editor.
  24.      */
  25.     @SuppressWarnings("unchecked")
  26.     // <editor-fold defaultstate="collapsed" desc="Generated Code">                          
  27.     private void initComponents() {
  28.         java.awt.GridBagConstraints gridBagConstraints;
  29.  
  30.         jPanel1 = new javax.swing.JPanel();
  31.         usuarioTF = new javax.swing.JTextField();
  32.         passTF = new javax.swing.JTextField();
  33.         passL = new javax.swing.JLabel();
  34.         UsuarioL = new javax.swing.JLabel();
  35.         BotonLogin = new javax.swing.JButton();
  36.         foto = new javax.swing.JLabel();
  37.  
  38.         setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
  39.  
  40.         jPanel1.setBackground(new java.awt.Color(255, 153, 255));
  41.         jPanel1.setLayout(new java.awt.GridBagLayout());
  42.  
  43.         usuarioTF.setBackground(new java.awt.Color(255, 153, 255));
  44.         usuarioTF.setForeground(new java.awt.Color(0, 0, 0));
  45.         usuarioTF.setText("Usuario");
  46.         usuarioTF.addMouseListener(new java.awt.event.MouseAdapter() {
  47.             public void mouseClicked(java.awt.event.MouseEvent evt) {
  48.                 usuarioTFMouseClicked(evt);
  49.             }
  50.         });
  51.         usuarioTF.addActionListener(new java.awt.event.ActionListener() {
  52.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  53.                 usuarioTFActionPerformed(evt);
  54.             }
  55.         });
  56.         gridBagConstraints = new java.awt.GridBagConstraints();
  57.         gridBagConstraints.gridx = 1;
  58.         gridBagConstraints.gridy = 2;
  59.         gridBagConstraints.insets = new java.awt.Insets(10, 10, 10, 10);
  60.         jPanel1.add(usuarioTF, gridBagConstraints);
  61.  
  62.         passTF.setBackground(new java.awt.Color(255, 153, 255));
  63.         passTF.setForeground(new java.awt.Color(0, 0, 0));
  64.         passTF.setText("Contraseña");
  65.         passTF.addMouseListener(new java.awt.event.MouseAdapter() {
  66.             public void mouseClicked(java.awt.event.MouseEvent evt) {
  67.                 passTFMouseClicked(evt);
  68.             }
  69.         });
  70.         gridBagConstraints = new java.awt.GridBagConstraints();
  71.         gridBagConstraints.gridx = 1;
  72.         gridBagConstraints.gridy = 4;
  73.         gridBagConstraints.insets = new java.awt.Insets(10, 10, 10, 10);
  74.         jPanel1.add(passTF, gridBagConstraints);
  75.  
  76.         passL.setFont(new java.awt.Font("Noto Sans", 1, 18)); // NOI18N
  77.         passL.setForeground(new java.awt.Color(0, 0, 0));
  78.         passL.setText("Contraseña");
  79.         gridBagConstraints = new java.awt.GridBagConstraints();
  80.         gridBagConstraints.gridx = 1;
  81.         gridBagConstraints.gridy = 3;
  82.         gridBagConstraints.insets = new java.awt.Insets(10, 10, 10, 10);
  83.         jPanel1.add(passL, gridBagConstraints);
  84.  
  85.         UsuarioL.setFont(new java.awt.Font("Noto Sans", 1, 18)); // NOI18N
  86.         UsuarioL.setForeground(new java.awt.Color(0, 0, 0));
  87.         UsuarioL.setText("Usuario ");
  88.         gridBagConstraints = new java.awt.GridBagConstraints();
  89.         gridBagConstraints.gridx = 1;
  90.         gridBagConstraints.gridy = 1;
  91.         gridBagConstraints.insets = new java.awt.Insets(10, 10, 10, 10);
  92.         jPanel1.add(UsuarioL, gridBagConstraints);
  93.  
  94.         BotonLogin.setBackground(new java.awt.Color(255, 255, 255));
  95.         BotonLogin.setFont(new java.awt.Font("Noto Sans", 1, 14)); // NOI18N
  96.         BotonLogin.setForeground(new java.awt.Color(0, 0, 0));
  97.         BotonLogin.setText("Login");
  98.         gridBagConstraints = new java.awt.GridBagConstraints();
  99.         gridBagConstraints.gridx = 1;
  100.         gridBagConstraints.gridy = 5;
  101.         gridBagConstraints.insets = new java.awt.Insets(10, 10, 10, 10);
  102.         jPanel1.add(BotonLogin, gridBagConstraints);
  103.  
  104.         foto.setIcon(new javax.swing.ImageIcon("/home/gyron/Desktop/Todo/Univalle/SEMESTRE 6/DESARROLLO DE SOFTWARE I/icons8-user-64.png")); // NOI18N
  105.         gridBagConstraints = new java.awt.GridBagConstraints();
  106.         gridBagConstraints.gridx = 1;
  107.         gridBagConstraints.gridy = 0;
  108.         gridBagConstraints.insets = new java.awt.Insets(10, 10, 10, 10);
  109.         jPanel1.add(foto, gridBagConstraints);
  110.  
  111.         javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
  112.         getContentPane().setLayout(layout);
  113.         layout.setHorizontalGroup(
  114.             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  115.             .addGroup(layout.createSequentialGroup()
  116.                 .addGap(264, 264, 264)
  117.                 .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 262, javax.swing.GroupLayout.PREFERRED_SIZE)
  118.                 .addContainerGap(264, Short.MAX_VALUE))
  119.         );
  120.         layout.setVerticalGroup(
  121.             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  122.             .addGroup(layout.createSequentialGroup()
  123.                 .addGap(36, 36, 36)
  124.                 .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 325, javax.swing.GroupLayout.PREFERRED_SIZE)
  125.                 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
  126.         );
  127.  
  128.         pack();
  129.     }// </editor-fold>                        
  130.  
  131.     private void usuarioTFActionPerformed(java.awt.event.ActionEvent evt) {                                          
  132.         // TODO add your handling code here:
  133.     }                                        
  134.  
  135.     private void usuarioTFMouseClicked(java.awt.event.MouseEvent evt) {                                      
  136.         // TODO add your handling code here:
  137.         usuarioTF.setText("");
  138.     }                                      
  139.  
  140.     private void passTFMouseClicked(java.awt.event.MouseEvent evt) {                                    
  141.         // TODO add your handling code here:
  142.         passTF.setText("");
  143.     }                                  
  144.  
  145.     /**
  146.      * @param args the command line arguments
  147.      */
  148.     public static void main(String args[]) {
  149.         /* Set the Nimbus look and feel */
  150.         //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
  151.         /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
  152.          * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
  153.          */
  154.         try {
  155.             for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
  156.                 if ("Nimbus".equals(info.getName())) {
  157.                     javax.swing.UIManager.setLookAndFeel(info.getClassName());
  158.                     break;
  159.                 }
  160.             }
  161.         } catch (ClassNotFoundException ex) {
  162.             java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  163.         } catch (InstantiationException ex) {
  164.             java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  165.         } catch (IllegalAccessException ex) {
  166.             java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  167.         } catch (javax.swing.UnsupportedLookAndFeelException ex) {
  168.             java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  169.         }
  170.         //</editor-fold>
  171.  
  172.         /* Create and display the form */
  173.         java.awt.EventQueue.invokeLater(new Runnable() {
  174.             public void run() {
  175.                 new Login().setVisible(true);
  176.             }
  177.         });
  178.     }
  179.  
  180.     // Variables declaration - do not modify                    
  181.     private javax.swing.JButton BotonLogin;
  182.     private javax.swing.JLabel UsuarioL;
  183.     private javax.swing.JLabel foto;
  184.     private javax.swing.JPanel jPanel1;
  185.     private javax.swing.JLabel passL;
  186.     private javax.swing.JTextField passTF;
  187.     private javax.swing.JTextField usuarioTF;
  188.     // End of variables declaration                  
  189. }
  190.  

Replies to Untitled rss

Title Name Language When
Re: Untitled Ivory Water Vole text 2 Years ago.