/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package pkg161128_banking_geruest; /** * * @author bnetz */ public class FensterAnmelden extends javax.swing.JFrame { /** * Creates new form FensterBanking */ public FensterAnmelden() { initComponents(); } /** * 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") // //GEN-BEGIN:initComponents private void initComponents() { lblUeberschrift = new javax.swing.JLabel(); lblAnweisung = new javax.swing.JLabel(); lblUsername = new javax.swing.JLabel(); lblPaswort = new javax.swing.JLabel(); lblAusgabe = new javax.swing.JLabel(); txtUsername = new javax.swing.JTextField(); txtPasswort = new javax.swing.JTextField(); btAnmelden = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); lblUeberschrift.setFont(new java.awt.Font("Lucida Grande", 1, 24)); // NOI18N lblUeberschrift.setText("Online-Banking"); lblAnweisung.setText("Bitte geben Sie Ihre Daten ein."); lblUsername.setText("Benutzername:"); lblPaswort.setText("Passwort:"); lblAusgabe.setForeground(new java.awt.Color(255, 51, 51)); txtUsername.setText("heini"); txtUsername.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtUsernameActionPerformed(evt); } }); txtPasswort.setText("1234"); txtPasswort.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtPasswortActionPerformed(evt); } }); btAnmelden.setText("anmelden"); btAnmelden.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btAnmeldenActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(54, 54, 54) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(lblUsername) .addComponent(lblPaswort)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(txtUsername) .addComponent(txtPasswort, javax.swing.GroupLayout.DEFAULT_SIZE, 122, Short.MAX_VALUE)) .addGap(0, 0, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap(122, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(lblUeberschrift) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(lblAnweisung) .addGap(90, 90, 90)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(lblAusgabe, javax.swing.GroupLayout.PREFERRED_SIZE, 165, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(52, 52, 52)))) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(btAnmelden) .addGap(41, 41, 41)))) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(16, 16, 16) .addComponent(lblUeberschrift) .addGap(18, 18, 18) .addComponent(lblAnweisung) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblUsername) .addComponent(txtUsername, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(20, 20, 20) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblPaswort) .addComponent(txtPasswort, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(38, 38, 38) .addComponent(btAnmelden) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 39, Short.MAX_VALUE) .addComponent(lblAusgabe) .addGap(20, 20, 20)) ); pack(); }// //GEN-END:initComponents private void txtPasswortActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_txtPasswortActionPerformed {//GEN-HEADEREND:event_txtPasswortActionPerformed // TODO add your handling code here: }//GEN-LAST:event_txtPasswortActionPerformed private void txtUsernameActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_txtUsernameActionPerformed {//GEN-HEADEREND:event_txtUsernameActionPerformed // TODO add your handling code here: }//GEN-LAST:event_txtUsernameActionPerformed private void btAnmeldenActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btAnmeldenActionPerformed {//GEN-HEADEREND:event_btAnmeldenActionPerformed // Methode anmeldedatenpruefen(...) der Fachschicht aufrufen // und Rückgabewert auf lblAusgabe setzen // Pro-Version: dieses Fenster schließen, wenn Anmeldung ok }//GEN-LAST:event_btAnmeldenActionPerformed /** * @param args the command line arguments */ public static void main(String args[]) { /* Set the Nimbus look and feel */ // /* 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(FensterAnmelden.class.getName()). log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(FensterAnmelden.class.getName()). log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(FensterAnmelden.class.getName()). log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(FensterAnmelden.class.getName()). log(java.util.logging.Level.SEVERE, null, ex); } // // // // /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new FensterAnmelden().setVisible(true); } }); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton btAnmelden; private javax.swing.JLabel lblAnweisung; private javax.swing.JLabel lblAusgabe; private javax.swing.JLabel lblPaswort; private javax.swing.JLabel lblUeberschrift; private javax.swing.JLabel lblUsername; private javax.swing.JTextField txtPasswort; private javax.swing.JTextField txtUsername; // End of variables declaration//GEN-END:variables }