Advertisement
Guest User

Untitled

a guest
Jul 29th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 9.57 KB | None | 0 0
  1. /*
  2.  * To change this template, choose Tools | Templates
  3.  * and open the template in the editor.
  4.  */
  5.  
  6. /*
  7.  * LoginPanel.java
  8.  *
  9.  * Created on 27.02.2011, 00:27:42
  10.  */
  11.  
  12. package view.panel;
  13. //import de.heizoelklick.*;
  14.  
  15. import actionListener.LoginPanelActionListener;
  16. import javax.swing.JPasswordField;
  17. import javax.swing.JTextField;
  18.  
  19. /**
  20.  *
  21.  * @author Ted
  22.  */
  23. public class LoginPanel extends view.defaultLayout.JPanelLayout1 { //javax.swing.JPanel { //
  24.  
  25.     /** Creates new form LoginPanel */
  26.     public LoginPanel() {
  27.         super();
  28.         this.initComponents();
  29.     }
  30.  
  31.     /** This method is called from within the constructor to
  32.      * initialize the form.
  33.      * WARNING: Do NOT modify this code. The content of this method is
  34.      * always regenerated by the Form Editor.
  35.      */
  36.     @SuppressWarnings("unchecked")
  37.     // <editor-fold defaultstate="collapsed" desc="Generated Code">                          
  38.     private void initComponents() {
  39.  
  40.         jtf_user = new javax.swing.JTextField();
  41.         jbu_login = new javax.swing.JButton();
  42.         jSeparator1 = new javax.swing.JSeparator();
  43.         jLabel1 = new javax.swing.JLabel();
  44.         jLabel2 = new javax.swing.JLabel();
  45.         jLabel3 = new javax.swing.JLabel();
  46.         jCheckBox1 = new javax.swing.JCheckBox();
  47.         jLabel4 = new javax.swing.JLabel();
  48.         jLabel5 = new javax.swing.JLabel();
  49.         jSeparator3 = new javax.swing.JSeparator();
  50.         jtf_password = new javax.swing.JPasswordField();
  51.  
  52.         setPreferredSize(new java.awt.Dimension(356, 300));
  53.  
  54.         jtf_user.addActionListener(new java.awt.event.ActionListener() {
  55.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  56.                 jtf_userActionPerformed(evt);
  57.             }
  58.         });
  59.  
  60.         jbu_login.setBackground(new java.awt.Color(32, 57, 61));
  61.         jbu_login.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
  62.         jbu_login.setForeground(getForeground());
  63.         jbu_login.setText("Anmelden");
  64.         jbu_login.setToolTipText("Klicken Sie hier um sich einzuloggen.");
  65.         jbu_login.addActionListener(new java.awt.event.ActionListener() {
  66.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  67.                 jbu_loginActionPerformed(evt);
  68.             }
  69.         });
  70.  
  71.         jSeparator1.setBackground(new java.awt.Color(229, 219, 201));
  72.         jSeparator1.setForeground(new java.awt.Color(240, 232, 221));
  73.  
  74.         jLabel1.setFont(new java.awt.Font("Verdana", 1, 12));
  75.         jLabel1.setForeground(getForeground());
  76.         jLabel1.setText("Am System anmelden");
  77.  
  78.         jLabel2.setFont(getFont());
  79.         jLabel2.setForeground(getForeground());
  80.         jLabel2.setText("Passwort");
  81.  
  82.         jLabel3.setFont(getFont());
  83.         jLabel3.setForeground(getForeground());
  84.         jLabel3.setText("Benutzername");
  85.  
  86.         jCheckBox1.setBackground(getBackground());
  87.         jCheckBox1.setFont(getFont());
  88.         jCheckBox1.setForeground(getForeground());
  89.         jCheckBox1.setText("Benutzername merken");
  90.  
  91.         jLabel4.setFont(getFont());
  92.         jLabel4.setForeground(getForeground());
  93.         jLabel4.setText("Benutzername vergessen?");
  94.  
  95.         jLabel5.setFont(getFont());
  96.         jLabel5.setForeground(getForeground());
  97.         jLabel5.setText("Passwort vergessen?");
  98.  
  99.         jSeparator3.setBackground(new java.awt.Color(229, 219, 201));
  100.         jSeparator3.setForeground(new java.awt.Color(240, 232, 221));
  101.  
  102.         jtf_password.addActionListener(new java.awt.event.ActionListener() {
  103.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  104.                 jtf_passwordActionPerformed(evt);
  105.             }
  106.         });
  107.  
  108.         javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
  109.         this.setLayout(layout);
  110.         layout.setHorizontalGroup(
  111.             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  112.             .addGroup(layout.createSequentialGroup()
  113.                 .addContainerGap()
  114.                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
  115.                     .addComponent(jLabel1)
  116.                     .addGroup(layout.createSequentialGroup()
  117.                         .addGap(12, 12, 12)
  118.                         .addComponent(jLabel3))
  119.                     .addGroup(layout.createSequentialGroup()
  120.                         .addGap(12, 12, 12)
  121.                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
  122.                             .addGroup(layout.createSequentialGroup()
  123.                                 .addComponent(jCheckBox1)
  124.                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
  125.                                 .addComponent(jbu_login, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE))
  126.                             .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.LEADING)
  127.                             .addComponent(jtf_user, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 301, Short.MAX_VALUE)
  128.                             .addComponent(jtf_password, javax.swing.GroupLayout.Alignment.LEADING)))
  129.                     .addGroup(layout.createSequentialGroup()
  130.                         .addGap(10, 10, 10)
  131.                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  132.                             .addComponent(jLabel5)
  133.                             .addComponent(jLabel4)))
  134.                     .addComponent(jSeparator3, javax.swing.GroupLayout.DEFAULT_SIZE, 326, Short.MAX_VALUE)
  135.                     .addComponent(jSeparator1))
  136.                 .addContainerGap())
  137.         );
  138.         layout.setVerticalGroup(
  139.             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  140.             .addGroup(layout.createSequentialGroup()
  141.                 .addGap(17, 17, 17)
  142.                 .addComponent(jLabel1)
  143.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  144.                 .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
  145.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
  146.                 .addComponent(jLabel3)
  147.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  148.                 .addComponent(jtf_user, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  149.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
  150.                 .addComponent(jLabel2)
  151.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  152.                 .addComponent(jtf_password, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  153.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  154.                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  155.                     .addComponent(jbu_login)
  156.                     .addComponent(jCheckBox1))
  157.                 .addGap(18, 18, 18)
  158.                 .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
  159.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  160.                 .addComponent(jLabel4)
  161.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  162.                 .addComponent(jLabel5)
  163.                 .addContainerGap(46, Short.MAX_VALUE))
  164.         );
  165.     }// </editor-fold>                        
  166.  
  167.     private void jbu_loginActionPerformed(java.awt.event.ActionEvent evt) {                                          
  168.         LoginPanelActionListener listener = new LoginPanelActionListener();
  169.         this.jbu_login.setName("jbu_login");
  170.         this.jtf_user.setName("jtf_user");
  171.         this.jtf_password.setName("jtf_password");
  172.         listener.loginActionPerformed(evt);      
  173.     }                                        
  174.  
  175.     private void jtf_userActionPerformed(java.awt.event.ActionEvent evt) {                                        
  176.         // TODO add your handling code here:
  177.     }                                        
  178.  
  179.     private void jtf_passwordActionPerformed(java.awt.event.ActionEvent evt) {                                            
  180.         // TODO add your handling code here:
  181.     }                                            
  182.  
  183.     public JTextField get_jtf_user() {
  184.         return this.jtf_user;
  185.     }
  186.  
  187.     public void set_jtf_user(JTextField jtf) {
  188.         this.jtf_user = jtf;
  189.     }
  190.  
  191.     public JPasswordField get_jtf_password() {
  192.         return this.jtf_password;
  193.     }
  194.  
  195.     public void set_jtf_password(JPasswordField jpf) {
  196.         this.jtf_password = jpf;
  197.     }
  198.  
  199.     // Variables declaration - do not modify                    
  200.     private javax.swing.JCheckBox jCheckBox1;
  201.     private javax.swing.JLabel jLabel1;
  202.     private javax.swing.JLabel jLabel2;
  203.     private javax.swing.JLabel jLabel3;
  204.     private javax.swing.JLabel jLabel4;
  205.     private javax.swing.JLabel jLabel5;
  206.     private javax.swing.JSeparator jSeparator1;
  207.     private javax.swing.JSeparator jSeparator3;
  208.     private javax.swing.JButton jbu_login;
  209.     private javax.swing.JPasswordField jtf_password;
  210.     private javax.swing.JTextField jtf_user;
  211.     // End of variables declaration                  
  212.  
  213. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement