Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
- /*
- * LoginFrame.java
- *
- * Created on Jul 26, 2010, 2:31:50 AM
- */
- /**
- *
- * @author M
- */
- public class LoginFrame extends javax.swing.JFrame {
- /** Creates new form LoginFrame */
- public LoginFrame() {
- 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")
- // <editor-fold defaultstate="collapsed" desc="Generated Code">
- private void initComponents() {
- jLabel1 = new javax.swing.JLabel();
- jLabel2 = new javax.swing.JLabel();
- usernameBox = new javax.swing.JTextField();
- jLabel3 = new javax.swing.JLabel();
- remembermeCheckbox = new javax.swing.JCheckBox();
- loginButton = new javax.swing.JButton();
- passwordBox = new javax.swing.JPasswordField();
- setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
- setTitle("Login");
- setResizable(false);
- jLabel1.setText("Please enter your login information:");
- jLabel2.setText("Username:");
- jLabel3.setText("Password:");
- remembermeCheckbox.setText("Remember Me");
- loginButton.setText("Log In!");
- loginButton.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- loginButtonActionPerformed(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()
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addContainerGap()
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(jLabel1)
- .addGroup(layout.createSequentialGroup()
- .addGap(10, 10, 10)
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
- .addComponent(usernameBox, javax.swing.GroupLayout.DEFAULT_SIZE, 198, Short.MAX_VALUE)
- .addComponent(jLabel2)
- .addComponent(jLabel3)
- .addComponent(remembermeCheckbox)
- .addComponent(passwordBox)))))
- .addGroup(layout.createSequentialGroup()
- .addGap(32, 32, 32)
- .addComponent(loginButton)))
- .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
- );
- layout.setVerticalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addContainerGap()
- .addComponent(jLabel1)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(jLabel2)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(usernameBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
- .addComponent(jLabel3)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(passwordBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addGap(7, 7, 7)
- .addComponent(remembermeCheckbox)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(loginButton)
- .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
- );
- pack();
- }// </editor-fold>
- private void loginButtonActionPerformed(java.awt.event.ActionEvent evt) {
- dispose();
- }
- /**
- * @param args the command line arguments
- */
- public static void main(String args[]) {
- java.awt.EventQueue.invokeLater(new Runnable() {
- public void run() {
- new LoginFrame().setVisible(true);
- }
- });
- }
- // Variables declaration - do not modify
- private javax.swing.JLabel jLabel1;
- private javax.swing.JLabel jLabel2;
- private javax.swing.JLabel jLabel3;
- private javax.swing.JButton loginButton;
- private javax.swing.JPasswordField passwordBox;
- private javax.swing.JCheckBox remembermeCheckbox;
- private javax.swing.JTextField usernameBox;
- // End of variables declaration
- }
Add Comment
Please, Sign In to add comment