SlideShare une entreprise Scribd logo
1  sur  50
Télécharger pour lire hors ligne
STUDENT
APPLICATION FORM
      RESHMA JOHNEY
       ROLL NO:24




                    Submitted to MISS Divya James
                           Submitted on 1-11-2010
STUDENT APPLICATON FORM
                                  RESHMA JOHNEY
             Second year, Rajagiri School of Engineering and Technology
                             KAKANAD, ERNAKULAM
                             reshmajohney@yahoo.com




 “STUDENT APPLICATION FORM” aims at developing student application form
where we can easily store the details of a new student and retrieve the details of student
thereby. When a student comes, we can enter the details of the student in the student
application form and can easily update the details of the student when required. In this
assignment, an additional facility is given where we can delete the details of a student
when a need arises. The assignment is very useful and proper validation is given for each
field and hopes that the computerization of the Student Application Form will not only
improves the efficiency but will also reduce human stress thereby indirectly improving
human recourses.
INDEX

    Sl.No:                     TOPICS                                 Page_no:
       1                  Problem definition                              3
       2                Theoretical Background                           3-4
       3                    Table Design                                 6-7
       4                    Program code                                8-44
       5                        Result                                 44-49
       6                     Conclusion                                  50



                                 I.   PROBLEM DEFINTION

 The Student Application form is designed & developed for the proper entry and updation
of student’s details. The Student details are entered in Student Entry form and these
corresponding student details are entered to a database using ODBC connectivity. When a
student wishes to update the details, he can update the details using an updating form. And
the updated details will be also updated to the database. There is another option is given in
which student can delete his account and these changes will directly reflect in the database.


                                               i.
                          II.   THEORETICAL BACKGROUND

The entire code is done with java swing controls. Swing, which is an extension library
to the AWT, includes new and improved components that enhance the look and
functionality of GUIs. Swing can be used to build Standalone swing GUIs Apps. It
employs model/view design architecture. Swing is more portable and more flexible than
AWT. Swing is built on top of AWT and is entirely written in Java, using AWT’s
lightweight component support. In particular, unlike AWT, the architecture
of Swing components makes it easy to customize both their appearance and behavior.
Components from AWT and Swing can be mixed, allowing you to add Swing support
to existing AWT-based programs. For example, swing components such as JSlider,
JButton and JCheckbox could be used in the same program with standard AWT labels,
textfields and scrollbars. You could subclass the existingSwing UI, model, or change
listener classes without having to reinvent the entire implementation. Swing also has the
ability to replace these objects on-the-fly.
Form is designed for selection of the different Menus. Following forms are mainly
used:-

   1.         Application Form
   2          Updating Form
               a)   Update
               b) Deletion

   And the form design is a follows…


                               STUDENT ENTRY FORM

       As said earlier, the student application form has the following options
   ‘SUBMIT’, ‘UPDATE’, ‘RESET’, ‘EXIT’.
UPDATION FORM

By clicking the menu ‘UPDATE, the form will direct in to another form named
“UPDATON FORM” and this form can used as a means for updating the student
details if required.




By clicking the ‘UPDATE’ Menu of the first form (student application form) the
above form will be displayed for the updating facility. Following fields have been
provided for the entry of the updated information:-
1.           ID.
2.           NAME.
3.           COURSE. (Where we cannot change the value of   ID, NAME, AND COURSE).
4.           AGE.
5.           BRANCH.
6.           COUNTRY.
7.           PLACE.
8.           E-mail ID.
9.           DATE OF BIRTH. (cannot change the value)

 In addition, clear, delete user, update, exit buttons and a combo box is also provided
in order to select the student name from database have been provided in the form.



                                     BOOK DELETE



By clicking the Delete Menu of the updating form, the selected user account and his
details will be deleted from the database using the query:

String d="DELETE from student where NAME='"+combo.getSelectedItem () +"'";



                                         Table Design
 Every form is linked to a database (Microsoft Access 2010) form. And table design
 for form is given as follows.

      student

      FIELD NAME                                   DATATYPE
      ID                                           AuoNumber
      NAME                                         Text
      AGE                                          Number
      DATE_OF_BIRTH                                Number
      BRANCH                                       Text
      COUNTRY                                      Text
      PLACE                                        Text
EMAIL                           Text
COURCE                          Text

The database is given below..
PROGRAM CODE
PROGRAM CODE FOR STUDENT APPLICATION FORM
CODE:

/*
 * NewJFrame.java(the name of my java file which is used to enter the details of student
 *
 * Created on October 13, 2010, 8:59 AM
 */
//package student_application_form;
import java.sql.*;


/**
 *
 * @author RESHMA
 */
public class NewJFrame extends javax.swing.JFrame {

  /** Creates new form NewJFrame */
  public NewJFrame() {
    initComponents();
    load_date();
    load_cource();

  }
  public void load_cource()
  {
      course_combo .addItem("B Tech");
      course_combo.addItem("M Tech");
      course_combo.addItem("MCA");
  }
  public void load_date()
  {
      int i;
      for( i=1;i<=31;i++){
      date_combo.addItem(i);
       }
for( i=1;i<=12;i++){
month_combo.addItem(i);
}
for( i=1980;i<=2010;i++){
year_combo.addItem(i);
}
}

/** 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.
 */
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {

  buttonGroup1 = new javax.swing.ButtonGroup();
  buttonGroup2 = new javax.swing.ButtonGroup();
  label1 = new java.awt.Label();
  label2 = new java.awt.Label();
  NAME = new java.awt.TextField();
  label3 = new java.awt.Label();
  AGE = new java.awt.TextField();
  label4 = new java.awt.Label();
  BRANCH = new java.awt.TextField();
  label5 = new java.awt.Label();
  COUNTRY = new java.awt.TextField();
  label6 = new java.awt.Label();
  PLACE = new java.awt.TextField();
  label7 = new java.awt.Label();
  EMAIL = new java.awt.TextField();
  RESET = new javax.swing.JButton();
  submit = new javax.swing.JButton();
  EXIT = new javax.swing.JButton();
  Success = new java.awt.Label();
  Label8 = new java.awt.Label();
  ID = new java.awt.TextField();
  UPDATE = new javax.swing.JToggleButton();
  age_status = new java.awt.Label();
  jLabel1 = new javax.swing.JLabel();
  name_status = new java.awt.Label();
  jLabel2 = new javax.swing.JLabel();
  status1 = new javax.swing.JLabel();
  jLabel3 = new javax.swing.JLabel();
  month_combo = new javax.swing.JComboBox();
  date_combo = new javax.swing.JComboBox();
  year_combo = new javax.swing.JComboBox();
  jLabel4 = new javax.swing.JLabel();
  jLabel5 = new javax.swing.JLabel();
  jLabel6 = new javax.swing.JLabel();
  jLabel7 = new javax.swing.JLabel();
  course_combo = new javax.swing.JComboBox();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setBackground(new java.awt.Color(102, 255, 255));
setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
setForeground(new java.awt.Color(204, 51, 255));

label1.setAlignment(java.awt.Label.CENTER);
label1.setBackground(new java.awt.Color(255, 102, 153));
label1.setForeground(new java.awt.Color(51, 255, 51));
label1.setText("STUDENT ENTRY FORM");
label1.addMouseListener(new java.awt.event.MouseAdapter() {
   public void mouseClicked(java.awt.event.MouseEvent evt) {
     label1MouseClicked(evt);
   }
});
label1.addComponentListener(new java.awt.event.ComponentAdapter() {
   public void componentHidden(java.awt.event.ComponentEvent evt) {
     label1ComponentHidden(evt);
   }
});
label1.addHierarchyListener(new java.awt.event.HierarchyListener() {
   public void hierarchyChanged(java.awt.event.HierarchyEvent evt) {
     label1HierarchyChanged(evt);
   }
});

label2.setText("NAME :");

NAME.addActionListener(new java.awt.event.ActionListener() {
   public void actionPerformed(java.awt.event.ActionEvent evt) {
     NAMEActionPerformed(evt);
   }
});
NAME.addFocusListener(new java.awt.event.FocusAdapter() {
   public void focusLost(java.awt.event.FocusEvent evt) {
     NAMEFocusLost(evt);
   }
});

label3.setText(" AGE    :");

AGE.addFocusListener(new java.awt.event.FocusAdapter() {
   public void focusLost(java.awt.event.FocusEvent evt) {
     AGEFocusLost(evt);
   }
});
label4.setText("BRANCH:");

    BRANCH.addFocusListener(new java.awt.event.FocusAdapter() {
       public void focusLost(java.awt.event.FocusEvent evt) {
         BRANCHFocusLost(evt);
       }
    });

    label5.setText("COUNTRY");

    COUNTRY.addActionListener(new java.awt.event.ActionListener() {
       public void actionPerformed(java.awt.event.ActionEvent evt) {
         COUNTRYActionPerformed(evt);
       }
    });
    COUNTRY.addFocusListener(new java.awt.event.FocusAdapter() {
       public void focusGained(java.awt.event.FocusEvent evt) {
         COUNTRYFocusGained(evt);
       }
       public void focusLost(java.awt.event.FocusEvent evt) {
         COUNTRYFocusLost(evt);
       }
    });

    label6.setText("PLACE");

    label7.setText("E-mail ID");

    RESET.setBackground(new java.awt.Color(255, 51, 255));
    RESET.setForeground(new java.awt.Color(51, 255, 51));
    RESET.setText("RESET");
    RESET.addActionListener(new java.awt.event.ActionListener() {
       public void actionPerformed(java.awt.event.ActionEvent evt) {
         RESETActionPerformed(evt);
       }
    });

     submit.setBackground(new java.awt.Color(255, 51, 255));
     submit.setForeground(new java.awt.Color(51, 255, 51));
     submit.setText("SUBMIT");
     submit.setBorder(javax.swing.BorderFactory.createLineBorder(new
java.awt.Color(255, 51, 51)));
     submit.addActionListener(new java.awt.event.ActionListener() {
       public void actionPerformed(java.awt.event.ActionEvent evt) {
          submitActionPerformed(evt);
}
});
submit.addFocusListener(new java.awt.event.FocusAdapter() {
   public void focusGained(java.awt.event.FocusEvent evt) {
     submitFocusGained(evt);
   }
});

EXIT.setBackground(new java.awt.Color(255, 0, 255));
EXIT.setForeground(new java.awt.Color(51, 255, 51));
EXIT.setText("EXIT");
EXIT.addActionListener(new java.awt.event.ActionListener() {
   public void actionPerformed(java.awt.event.ActionEvent evt) {
     EXITActionPerformed(evt);
   }
});

Label8.setText("ID");

ID.addActionListener(new java.awt.event.ActionListener() {
   public void actionPerformed(java.awt.event.ActionEvent evt) {
     IDActionPerformed(evt);
   }
});
ID.addFocusListener(new java.awt.event.FocusAdapter() {
   public void focusGained(java.awt.event.FocusEvent evt) {
     IDFocusGained(evt);
   }
   public void focusLost(java.awt.event.FocusEvent evt) {
     IDFocusLost(evt);
   }
});

UPDATE.setBackground(new java.awt.Color(255, 0, 255));
UPDATE.setForeground(new java.awt.Color(102, 255, 51));
UPDATE.setText("UPDATE");
UPDATE.addActionListener(new java.awt.event.ActionListener() {
   public void actionPerformed(java.awt.event.ActionEvent evt) {
     UPDATEActionPerformed(evt);
   }
});

status1.setBackground(new java.awt.Color(51, 0, 204));
status1.setFont(new java.awt.Font("Traditional Arabic", 0, 36));
status1.setForeground(new java.awt.Color(51, 0, 51));
jLabel3.setText("DOB:");

    jLabel4.setText("D");

    jLabel5.setText("M");

    jLabel6.setText("Y");

    jLabel7.setText("COURSE");

    course_combo.addActionListener(new java.awt.event.ActionListener() {
       public void actionPerformed(java.awt.event.ActionEvent evt) {
         course_comboActionPerformed(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()
          .addContainerGap()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
           .addComponent(jLabel1)
           .addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                     .addGroup(layout.createSequentialGroup()
                        .addGap(8, 8, 8)
                        .addComponent(jLabel3))
                     .addGroup(layout.createSequentialGroup()
                        .addGap(18, 18, 18)
                        .addComponent(Label8,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
                     .addComponent(label5,
javax.swing.GroupLayout.PREFERRED_SIZE, 84,
javax.swing.GroupLayout.PREFERRED_SIZE))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                     .addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                          .addComponent(AGE,
javax.swing.GroupLayout.PREFERRED_SIZE, 32,
javax.swing.GroupLayout.PREFERRED_SIZE)
                          .addComponent(ID,
javax.swing.GroupLayout.PREFERRED_SIZE, 34,
javax.swing.GroupLayout.PREFERRED_SIZE))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                       .addComponent(age_status,
javax.swing.GroupLayout.DEFAULT_SIZE, 132, Short.MAX_VALUE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))
                     .addGroup(layout.createSequentialGroup()

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                          .addComponent(PLACE,
javax.swing.GroupLayout.PREFERRED_SIZE, 156,
javax.swing.GroupLayout.PREFERRED_SIZE)
                          .addGroup(layout.createSequentialGroup()
                             .addComponent(jLabel4,
javax.swing.GroupLayout.PREFERRED_SIZE, 7,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(date_combo,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jLabel5)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(month_combo,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jLabel6)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(year_combo,
javax.swing.GroupLayout.PREFERRED_SIZE, 61,
javax.swing.GroupLayout.PREFERRED_SIZE)))
                       .addGap(12, 12, 12))))
                .addGroup(layout.createSequentialGroup()
                   .addComponent(label3,
javax.swing.GroupLayout.PREFERRED_SIZE, 60,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                      .addGroup(javax.swing.GroupLayout.Alignment.LEADING,
layout.createSequentialGroup()
                         .addGap(116, 116, 116)
                         .addComponent(jLabel2))
                      .addGroup(layout.createSequentialGroup()
                         .addGap(144, 144, 144)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                          .addGroup(layout.createSequentialGroup()

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 250,
Short.MAX_VALUE)
                            .addComponent(name_status,
javax.swing.GroupLayout.PREFERRED_SIZE, 53,
javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING,
false)
                             .addComponent(COUNTRY,
javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
                             .addComponent(NAME,
javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.DEFAULT_SIZE, 164, Short.MAX_VALUE))
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING,
false)
                             .addComponent(BRANCH,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
                             .addComponent(EMAIL,
javax.swing.GroupLayout.DEFAULT_SIZE, 171, Short.MAX_VALUE)
                             .addComponent(course_combo,
javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.PREFERRED_SIZE, 95,
javax.swing.GroupLayout.PREFERRED_SIZE))))))
                .addGroup(layout.createSequentialGroup()
                   .addGap(51, 51, 51)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                     .addComponent(label7,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
                     .addComponent(label2,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
                     .addComponent(label6,
javax.swing.GroupLayout.PREFERRED_SIZE, 70,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING,
false)
                        .addComponent(label4,
javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
                        .addComponent(jLabel7,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 326,
Short.MAX_VALUE)))
              .addGap(68, 68, 68)))
          .addGap(591, 591, 591))
       .addGroup(layout.createSequentialGroup()
          .addGap(158, 158, 158)
          .addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE, 334,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(894, Short.MAX_VALUE))
      .addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
               .addGap(201, 201, 201)
               .addComponent(EXIT, javax.swing.GroupLayout.PREFERRED_SIZE, 78,
javax.swing.GroupLayout.PREFERRED_SIZE)
               .addGap(18, 18, 18)
               .addComponent(submit, javax.swing.GroupLayout.PREFERRED_SIZE, 98,
javax.swing.GroupLayout.PREFERRED_SIZE)
               .addGap(18, 18, 18)
               .addComponent(RESET))
            .addGroup(layout.createSequentialGroup()
               .addGap(208, 208, 208)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                  .addComponent(Success, javax.swing.GroupLayout.PREFERRED_SIZE,
243, javax.swing.GroupLayout.PREFERRED_SIZE)
                  .addComponent(UPDATE,
javax.swing.GroupLayout.PREFERRED_SIZE, 217,
javax.swing.GroupLayout.PREFERRED_SIZE))))
           .addContainerGap(910, Short.MAX_VALUE))
        .addGroup(layout.createSequentialGroup()
           .addGap(172, 172, 172)
           .addComponent(status1, javax.swing.GroupLayout.PREFERRED_SIZE, 445,
javax.swing.GroupLayout.PREFERRED_SIZE)
           .addContainerGap(769, Short.MAX_VALUE))
     );
     layout.setVerticalGroup(
        layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
           .addGap(28, 28, 28)
           .addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE, 33,
javax.swing.GroupLayout.PREFERRED_SIZE)
           .addGap(25, 25, 25)
           .addComponent(jLabel2)
           .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(name_status, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(jLabel1))
         .addGap(24, 24, 24)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
           .addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                 .addComponent(label2, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
                 .addComponent(NAME, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
              .addGap(18, 18, 18)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
layout.createSequentialGroup()
                    .addComponent(COUNTRY,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 18,
Short.MAX_VALUE)
                    .addComponent(EMAIL,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
                 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
layout.createSequentialGroup()
                    .addComponent(label6,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 18,
Short.MAX_VALUE)
                   .addComponent(label7,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(age_status,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
                     .addComponent(label3, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                     .addComponent(AGE, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                  .addGap(18, 18, 18)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                     .addComponent(PLACE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
                     .addComponent(label5,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))))
               .addGap(13, 13, 13))
            .addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                 .addComponent(ID, javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
                 .addComponent(Label8,
javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
              .addGap(30, 30, 30)))
         .addGap(10, 10, 10)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
              .addComponent(jLabel3)
              .addComponent(jLabel4)
              .addComponent(date_combo,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
              .addComponent(jLabel5)
              .addComponent(month_combo,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
               .addComponent(jLabel6)
               .addComponent(year_combo,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
            .addComponent(label4, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(BRANCH, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
         .addGap(18, 18, 18)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
            .addComponent(course_combo,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(jLabel7))
         .addGap(37, 37, 37)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
            .addComponent(submit, javax.swing.GroupLayout.PREFERRED_SIZE, 26,
javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(RESET)
            .addComponent(EXIT))
         .addGap(18, 18, 18)
         .addComponent(UPDATE)
         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
         .addComponent(Success, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
         .addGap(55, 55, 55)
         .addComponent(status1, javax.swing.GroupLayout.PREFERRED_SIZE, 43,
javax.swing.GroupLayout.PREFERRED_SIZE)
         .addContainerGap(342, Short.MAX_VALUE))
     );

     pack();
  }// </editor-fold>

  private void NAMEActionPerformed(java.awt.event.ActionEvent evt) {
     // TODO add your handling code here:
  }
private void RESETActionPerformed(java.awt.event.ActionEvent evt) {
     // TODO add your handling code here:
     ID.setText("");
     NAME.setText("");
     AGE.setText("");
     BRANCH.setText("");
     COUNTRY.setText("");
     PLACE.setText("");
     EMAIL.setText("");
     Success.setText("");
     age_status.setText("");
     status1.setText("");
  }

  private void submitActionPerformed(java.awt.event.ActionEvent evt) {
     // TODO add your handling code here:
    javax.swing.JOptionPane.showMessageDialog(null, "CHECK ALL FIELDS ONCE
AGAIN BEFORE LOGIN ");
        try{
           String aa="";
           Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
           String url="jdbc:odbc:student";
           Connection con=DriverManager.getConnection(url);
           Statement stmt=con.createStatement();
           String new_user="";
           String user=NAME.getText().trim();
           ResultSet rs=stmt.executeQuery("select * from student where
ID='"+ID.getText()+"'");

    while(rs.next()) {
      aa=rs.getString("ID");


    }
        if((ID.getText().equals(""))){
           Success.setText("Invalid Please provide a ID!");
        }
        else if((ID.getText().equals(aa))){
           Success.setText("ID Already exists");
        }
        else{


          String s="Insert into
student(ID,NAME,AGE,BRANCH,COUNTRY,PLACE,EMAIL,COURSE,DATE_,OF,BI
RTH)
values('"+ID.getText()+"','"+NAME.getText()+"','"+AGE.getText()+"','"+BRANCH.getTe
xt()+"','"+COUNTRY.getText()+"','"+PLACE.getText()+"','"+EMAIL.getText()+"','"+cour
se_combo.getSelectedItem()+"','"+date_combo.getSelectedItem()+"','"+month_combo.getS
electedItem()+"','"+year_combo.getSelectedItem()+"')";
           stmt.executeUpdate(s);
           Success.setText("SuccessFully Inserted....!");
           //Success.setText("New User added");

       javax.swing.JOptionPane.showMessageDialog(null, "NEW USER
ADDED!...........");
    }

        stmt.close();
        }



          catch(Exception e)
          {
            Success.setText("Error in Loading.....!");
          }




    }

    private void EXITActionPerformed(java.awt.event.ActionEvent evt) {
       // TODO add your handling code here:
       System.exit(0);
    }

    private void IDActionPerformed(java.awt.event.ActionEvent evt) {
       // TODO add your handling code here:

    }

    private void UPDATEActionPerformed(java.awt.event.ActionEvent evt) {
       // TODO add your handling code here:
       dispose();
       new s().setVisible(true);

}

    private void AGEFocusLost(java.awt.event.FocusEvent evt) {
// TODO add your handling code here:
         try
       {

       String check_age;
       int m;
       check_age=AGE.getText();
       if(check_age.equals(""))
          {

           Success.setText("");

       }
       else
       {
       m=Integer.parseInt(AGE.getText());




   if(m>30)
   {
      javax.swing.JOptionPane.showMessageDialog(null, "STUDENTS CANT HAVE
AN AGE ABOVE 30");
      age_status.setText("INVALID");
      AGE.setText("");

       }

else if (m< 1)
        {
         javax.swing.JOptionPane.showMessageDialog(null, "ENTER AGE PROPER ..");
        AGE.setText("");
        age_status.setText("INVALID");

       }
else
       {
               age_status.setText("");
       }

       }
           }

       catch(NumberFormatException e)
       {    Success.setText("AGE SHOULD BE AN INTEGER!!!!" );
}

      catch(Exception e)
      {

           age_status.setText("INVALID");
      }



  }

  private void IDFocusLost(java.awt.event.FocusEvent evt) {
     // TODO add your handling code here:
    try{
        String id="";

           if(ID.getText().equals(""))
           {

          Success.setText("");

      }
           else{
            id=ID.getText();
           int a=Integer.parseInt(id);

      // javax.swing.JOptionPane.showMessageDialog(null, "U CHOOSEN
"+ID.getText()+" ");
     }
    }
     catch(NumberFormatException e)
     {        javax.swing.JOptionPane.showMessageDialog(null, "ID SHOULD BE AN
INTEGER!!!!" );
             ID.setText("");
     }
  }

  private void BRANCHFocusLost(java.awt.event.FocusEvent evt) {
     // TODO add your handling code here:
     String brh="";
     brh=BRANCH.getText();
     if(brh.equals(""))
        {

          Success.setText("CHOOSE A BRANCH");
}
         else{
           //int a;
         // a=Integer.parseInt(brh);

    javax.swing.JOptionPane.showMessageDialog(null, "U CHOOSEN
"+BRANCH.getText()+" BRANCH");
     }
  }

     private void submitFocusGained(java.awt.event.FocusEvent evt) {
        // TODO add your handling code here:

      // javax.swing.JOptionPane.showMessageDialog(null, "CHECK ALL FIELDS
ONCE AGAIN BEFORE LOGIN ");
      // dispose();
 }

     private void NAMEFocusLost(java.awt.event.FocusEvent evt) {
        // TODO add your handling code here:
        status1.setText("WELCOME "+NAME.getText()+"!!!!!!!!!!");
/*
    String name_check;
    name_check=NAME.getText();
    if(name_check<99999&&name_check>1)
    {
        javax.swing.JOptionPane.showMessageDialog(null, "NAME IS INVLAID
..NAME CANNOT HAVE INTEGER VALUES");
       NAME.setText("");
       name_status.setText("INVALID");
    }

*/



     }

     private void label1ComponentHidden(java.awt.event.ComponentEvent evt) {
        // TODO add your handling code here:

     }

     private void IDFocusGained(java.awt.event.FocusEvent evt) {
        // TODO add your handling code here:
}

  private void label1HierarchyChanged(java.awt.event.HierarchyEvent evt) {


      // TODO add your handling code here:
  }

   private void label1MouseClicked(java.awt.event.MouseEvent evt) {
 // TODO add your handling code here:
   }

  private void COUNTRYFocusGained(java.awt.event.FocusEvent evt) {
     // TODO add your handling code here:

  }

  private void COUNTRYFocusLost(java.awt.event.FocusEvent evt) {
     // TODO add your handling code here:
      Success.setText("");
  }

  private void COUNTRYActionPerformed(java.awt.event.ActionEvent evt) {
     // TODO add your handling code here:
  }

  private void course_comboActionPerformed(java.awt.event.ActionEvent evt) {
     // TODO add your handling code here:
    /*course_combo .addItem("B Tech");
course_combo.addItem("M Tech");

course_combo.addItem("MCA");*/
}

  /**
   * @param args the command line arguments
   */
  public static void main(String args[]) {
     java.awt.EventQueue.invokeLater(new Runnable() {
        public void run() {
          new NewJFrame().setVisible(true);
        }
     });
  }
// Variables declaration - do not modify
    private java.awt.TextField AGE;
    private java.awt.TextField BRANCH;
    private java.awt.TextField COUNTRY;
    private java.awt.TextField EMAIL;
    private javax.swing.JButton EXIT;
    private java.awt.TextField ID;
    private java.awt.Label Label8;
    private java.awt.TextField NAME;
    private java.awt.TextField PLACE;
    private javax.swing.JButton RESET;
    private java.awt.Label Success;
    private javax.swing.JToggleButton UPDATE;
    private java.awt.Label age_status;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.ButtonGroup buttonGroup2;
    private javax.swing.JComboBox course_combo;
    private javax.swing.JComboBox date_combo;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private java.awt.Label label1;
    private java.awt.Label label2;
    private java.awt.Label label3;
    private java.awt.Label label4;
    private java.awt.Label label5;
    private java.awt.Label label6;
    private java.awt.Label label7;
    private javax.swing.JComboBox month_combo;
    private java.awt.Label name_status;
    private javax.swing.JLabel status1;
    private javax.swing.JButton submit;
    private javax.swing.JComboBox year_combo;
    // End of variables declaration

}


PROGRAM CODE FOR UPDATION FORM
CODE:
// the name of my java file is s.java
/*
 * s.java
 *
 * Created on October 17, 2010, 10:11 PM
 */
import java.sql.*;


/**
 *
 * @author RESHMA
 */
public class s_1 extends javax.swing.JFrame {

  /** Creates new form s */
  public s_1() {
     initComponents();
     loaddetails();
  }
   public void loaddetails()
  {
     try

    {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    String url="jdbc:odbc:student";
    Connection con=DriverManager.getConnection(url,"","");
    Statement stmt=con.createStatement();
    String sql="Select NAME from student";
    ResultSet rs=stmt.executeQuery(sql);
    while(rs.next()) {
          combo.addItem(rs.getString(1));
       }
     status1.setText("WELCOME "+NAME.getText()+"PLEASE UPDATE YOUR
ENTRIES !!!!!!!!!!");
    stmt.close();
    con.close();
    }
    catch(Exception e)
    {
    javax.swing.JOptionPane.showMessageDialog(null, "Error...!");
    }
  }

  /** 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.
 */
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {

  status = new java.awt.Label();
  label1 = new java.awt.Label();
  Label8 = new java.awt.Label();
  label3 = new java.awt.Label();
  label4 = new java.awt.Label();
  label5 = new java.awt.Label();
  label6 = new java.awt.Label();
  label7 = new java.awt.Label();
  ID = new java.awt.TextField();
  AGE = new java.awt.TextField();
  BRANCH = new java.awt.TextField();
  COUNTRY = new java.awt.TextField();
  PLACE = new java.awt.TextField();
  EMAIL = new java.awt.TextField();
  EXIT = new javax.swing.JButton();
  RESET = new javax.swing.JButton();
  combo = new javax.swing.JComboBox();
  UPDATE = new javax.swing.JToggleButton();
  DELETE = new javax.swing.JToggleButton();
  jLabel1 = new javax.swing.JLabel();
  status1 = new javax.swing.JLabel();
  jLabel2 = new javax.swing.JLabel();
  jLabel3 = new javax.swing.JLabel();
  jLabel4 = new javax.swing.JLabel();
  jLabel7 = new javax.swing.JLabel();
  jLabel8 = new javax.swing.JLabel();
  BIRTH = new javax.swing.JLabel();
  jLabel5 = new javax.swing.JLabel();
  BIRTH1 = new javax.swing.JLabel();
  jLabel6 = new javax.swing.JLabel();
  BIRTH2 = new javax.swing.JLabel();
  BIRTH3 = new javax.swing.JLabel();
  jLabel9 = new javax.swing.JLabel();
  NAME = new javax.swing.JLabel();

  setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
  setBackground(new java.awt.Color(143, 115, 132));
  setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
  setForeground(new java.awt.Color(50, 0, 50));
label1.setAlignment(java.awt.Label.CENTER);
label1.setBackground(new java.awt.Color(255, 51, 255));
label1.setFont(new java.awt.Font("Andalus", 2, 18));
label1.setForeground(new java.awt.Color(102, 102, 0));
label1.setText("UPDATION FORM");
label1.addInputMethodListener(new java.awt.event.InputMethodListener() {
   public void caretPositionChanged(java.awt.event.InputMethodEvent evt) {
   }
   public void inputMethodTextChanged(java.awt.event.InputMethodEvent evt) {
     label1InputMethodTextChanged(evt);
   }
});

Label8.setFont(new java.awt.Font("Andalus", 0, 12));
Label8.setForeground(new java.awt.Color(255, 102, 255));
Label8.setText("ID");

label3.setFont(new java.awt.Font("Andalus", 0, 12));
label3.setForeground(new java.awt.Color(255, 102, 255));
label3.setText(" AGE :");

label4.setFont(new java.awt.Font("Andalus", 0, 12));
label4.setForeground(new java.awt.Color(255, 102, 255));
label4.setText("BRANCH:");

label5.setFont(new java.awt.Font("Andalus", 0, 12));
label5.setForeground(new java.awt.Color(255, 102, 255));
label5.setText("COUNTRY");

label6.setFont(new java.awt.Font("Andalus", 0, 12));
label6.setForeground(new java.awt.Color(255, 102, 255));
label6.setText("PLACE");

label7.setFont(new java.awt.Font("Andalus", 0, 12));
label7.setForeground(new java.awt.Color(255, 102, 255));
label7.setText("E-mail ID");

ID.addActionListener(new java.awt.event.ActionListener() {
   public void actionPerformed(java.awt.event.ActionEvent evt) {
     IDActionPerformed(evt);
   }
});

EMAIL.addActionListener(new java.awt.event.ActionListener() {
 public void actionPerformed(java.awt.event.ActionEvent evt) {
   EMAILActionPerformed(evt);
}
});

EXIT.setBackground(new java.awt.Color(0, 51, 255));
EXIT.setFont(new java.awt.Font("Andalus", 0, 11));
EXIT.setForeground(new java.awt.Color(255, 255, 51));
EXIT.setText("EXIT");
EXIT.addActionListener(new java.awt.event.ActionListener() {
   public void actionPerformed(java.awt.event.ActionEvent evt) {
     EXITActionPerformed(evt);
   }
});

RESET.setBackground(new java.awt.Color(51, 51, 255));
RESET.setFont(new java.awt.Font("Andalus", 0, 12));
RESET.setForeground(new java.awt.Color(255, 255, 0));
RESET.setText("CLEAR");
RESET.addActionListener(new java.awt.event.ActionListener() {
   public void actionPerformed(java.awt.event.ActionEvent evt) {
     RESETActionPerformed(evt);
   }
});

combo.setBackground(new java.awt.Color(255, 204, 204));
combo.setFont(new java.awt.Font("Andalus", 0, 11));
combo.setForeground(new java.awt.Color(255, 255, 51));
combo.addActionListener(new java.awt.event.ActionListener() {
   public void actionPerformed(java.awt.event.ActionEvent evt) {
     comboActionPerformed(evt);
   }
});

UPDATE.setBackground(new java.awt.Color(0, 51, 255));
UPDATE.setFont(new java.awt.Font("Andalus", 0, 11));
UPDATE.setForeground(new java.awt.Color(255, 255, 51));
UPDATE.setText("UPDATE");
UPDATE.addActionListener(new java.awt.event.ActionListener() {
   public void actionPerformed(java.awt.event.ActionEvent evt) {
     UPDATEActionPerformed(evt);
   }
});

DELETE.setBackground(new java.awt.Color(0, 51, 255));
DELETE.setFont(new java.awt.Font("Andalus", 0, 11));
DELETE.setForeground(new java.awt.Color(255, 255, 51));
DELETE.setText("DELETE USER");
DELETE.addActionListener(new java.awt.event.ActionListener() {
       public void actionPerformed(java.awt.event.ActionEvent evt) {
         DELETEActionPerformed(evt);
       }
    });

    jLabel1.setFont(new java.awt.Font("Andalus", 0, 12));
    jLabel1.setForeground(new java.awt.Color(255, 51, 204));
    jLabel1.setText("STUDENT NAME");

    status1.setFont(new java.awt.Font("Andalus", 0, 11));

    jLabel2.setFont(new java.awt.Font("Andalus", 0, 12));
    jLabel2.setForeground(new java.awt.Color(255, 102, 255));
    jLabel2.setText("NAME :");

    jLabel3.setFont(new java.awt.Font("Andalus", 0, 12));
    jLabel3.setForeground(new java.awt.Color(255, 102, 255));
    jLabel3.setText("COURSE");

    jLabel4.setFont(new java.awt.Font("Andalus", 0, 11));
    jLabel4.setForeground(new java.awt.Color(255, 51, 255));
    jLabel4.setText("DATE OF BIRTH");

    jLabel5.setText("-");

    jLabel6.setText("-");

    NAME.setFont(new java.awt.Font("Andalus", 0, 12));
    NAME.setForeground(new java.awt.Color(102, 102, 255));

    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()
               .addGap(151, 151, 151)
               .addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE,
270, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGroup(layout.createSequentialGroup()
               .addGap(129, 129, 129)
               .addComponent(status1, javax.swing.GroupLayout.PREFERRED_SIZE,
412, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                 .addGroup(javax.swing.GroupLayout.Alignment.LEADING,
layout.createSequentialGroup()
                    .addGap(22, 22, 22)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(label6,
javax.swing.GroupLayout.PREFERRED_SIZE, 70,
javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(label7,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGroup(layout.createSequentialGroup()
                           .addComponent(label5,
javax.swing.GroupLayout.PREFERRED_SIZE, 77,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))
                         .addComponent(jLabel3,
javax.swing.GroupLayout.DEFAULT_SIZE, 95, Short.MAX_VALUE)
                         .addGroup(layout.createSequentialGroup()
                            .addComponent(jLabel2)
                            .addGap(18, 18, 18))
                         .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
layout.createSequentialGroup()
                            .addComponent(Label8,
javax.swing.GroupLayout.DEFAULT_SIZE, 61, Short.MAX_VALUE)
                            .addGap(34, 34, 34))
                         .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
layout.createSequentialGroup()
                            .addComponent(label3,
javax.swing.GroupLayout.DEFAULT_SIZE, 71, Short.MAX_VALUE)
                            .addGap(24, 24, 24))
                         .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
layout.createSequentialGroup()
                            .addComponent(label4,
javax.swing.GroupLayout.DEFAULT_SIZE, 69, Short.MAX_VALUE)
                            .addGap(26, 26, 26)))
                      .addComponent(jLabel4,
javax.swing.GroupLayout.PREFERRED_SIZE, 95,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                     .addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING,
false)
                           .addComponent(EMAIL,
javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
                           .addComponent(COUNTRY,
javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
                           .addComponent(PLACE,
javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.DEFAULT_SIZE, 191, Short.MAX_VALUE)
                           .addComponent(BRANCH,
javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))
                        .addGap(91, 91, 91)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                          .addGroup(layout.createSequentialGroup()

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                              .addComponent(BIRTH2,
javax.swing.GroupLayout.PREFERRED_SIZE, 54,
javax.swing.GroupLayout.PREFERRED_SIZE))
                           .addGroup(layout.createSequentialGroup()
                              .addGap(123, 123, 123)
                              .addComponent(jLabel8,
javax.swing.GroupLayout.PREFERRED_SIZE, 67,
javax.swing.GroupLayout.PREFERRED_SIZE))))
                     .addGroup(layout.createSequentialGroup()
                        .addComponent(BIRTH,
javax.swing.GroupLayout.PREFERRED_SIZE, 23,
javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel5,
javax.swing.GroupLayout.PREFERRED_SIZE, 12,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                       .addComponent(BIRTH1,
javax.swing.GroupLayout.PREFERRED_SIZE, 19,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                       .addComponent(jLabel6,
javax.swing.GroupLayout.PREFERRED_SIZE, 13,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(BIRTH3,
javax.swing.GroupLayout.PREFERRED_SIZE, 48,
javax.swing.GroupLayout.PREFERRED_SIZE))
                     .addComponent(jLabel9)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING,
false)
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING,
layout.createSequentialGroup()
                           .addComponent(ID,
javax.swing.GroupLayout.PREFERRED_SIZE, 22,
javax.swing.GroupLayout.PREFERRED_SIZE)
                           .addGap(130, 130, 130)
                           .addComponent(jLabel1,
javax.swing.GroupLayout.PREFERRED_SIZE, 94,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                          .addComponent(combo,
javax.swing.GroupLayout.PREFERRED_SIZE, 140,
javax.swing.GroupLayout.PREFERRED_SIZE))
                       .addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                             .addComponent(NAME,
javax.swing.GroupLayout.PREFERRED_SIZE, 133,
javax.swing.GroupLayout.PREFERRED_SIZE)
                             .addComponent(AGE,
javax.swing.GroupLayout.PREFERRED_SIZE, 32,
javax.swing.GroupLayout.PREFERRED_SIZE))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 119,
Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
                             .addGroup(layout.createSequentialGroup()
                                .addComponent(DELETE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))
                               .addComponent(EXIT,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
                               .addComponent(UPDATE,
javax.swing.GroupLayout.DEFAULT_SIZE, 144, Short.MAX_VALUE)
                               .addComponent(RESET,
javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)))))
                      .addGap(139, 139, 139))
                   .addGroup(javax.swing.GroupLayout.Alignment.LEADING,
layout.createSequentialGroup()
                      .addGap(284, 284, 284)
                      .addComponent(jLabel7)))
                .addGap(367, 367, 367)))
           .addContainerGap())
     );
     layout.setVerticalGroup(
        layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
layout.createSequentialGroup()
           .addGap(82, 82, 82)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
            .addGroup(layout.createSequentialGroup()
               .addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE, 28,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
              .addComponent(status1, javax.swing.GroupLayout.PREFERRED_SIZE, 23,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(ID, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                   .addComponent(jLabel1,
javax.swing.GroupLayout.PREFERRED_SIZE, 32,
javax.swing.GroupLayout.PREFERRED_SIZE)
                   .addComponent(combo,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))))
            .addComponent(Label8, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING,
false)
           .addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                 .addComponent(jLabel2)
                 .addComponent(NAME, javax.swing.GroupLayout.PREFERRED_SIZE,
23, javax.swing.GroupLayout.PREFERRED_SIZE))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                 .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE,
19, javax.swing.GroupLayout.PREFERRED_SIZE)
                 .addGroup(layout.createSequentialGroup()

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                   .addComponent(jLabel3,
javax.swing.GroupLayout.PREFERRED_SIZE, 24,
javax.swing.GroupLayout.PREFERRED_SIZE)))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(label3, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(AGE, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)))
            .addGroup(layout.createSequentialGroup()
               .addComponent(RESET, javax.swing.GroupLayout.PREFERRED_SIZE,
34, javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
              .addComponent(DELETE, javax.swing.GroupLayout.PREFERRED_SIZE,
32, javax.swing.GroupLayout.PREFERRED_SIZE)))
          .addGap(20, 20, 20)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
           .addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                 .addComponent(BRANCH,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
                 .addComponent(label4, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
              .addGap(17, 17, 17)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(COUNTRY,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(label5, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                 .addComponent(PLACE, javax.swing.GroupLayout.DEFAULT_SIZE,
24, Short.MAX_VALUE)
                 .addComponent(label6, 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.TRAILING)
.addComponent(label7, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
                  .addComponent(EMAIL, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)))
            .addGroup(layout.createSequentialGroup()
               .addComponent(UPDATE, javax.swing.GroupLayout.PREFERRED_SIZE,
31, javax.swing.GroupLayout.PREFERRED_SIZE)
               .addGap(18, 18, 18)
               .addComponent(EXIT, javax.swing.GroupLayout.PREFERRED_SIZE, 31,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
           .addGroup(layout.createSequentialGroup()
              .addGap(10, 10, 10)
              .addComponent(jLabel8)
              .addGap(8, 8, 8)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                 .addComponent(BIRTH2)
                 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
layout.createSequentialGroup()

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 16,
Short.MAX_VALUE)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                     .addComponent(jLabel5)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
                        .addComponent(BIRTH,
javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
                        .addComponent(jLabel4,
javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.DEFAULT_SIZE, 23, Short.MAX_VALUE))
                     .addComponent(BIRTH1,
javax.swing.GroupLayout.DEFAULT_SIZE, 23, Short.MAX_VALUE)
                     .addComponent(jLabel6)
.addComponent(BIRTH3,
javax.swing.GroupLayout.PREFERRED_SIZE, 23,
javax.swing.GroupLayout.PREFERRED_SIZE)))))
            .addGroup(layout.createSequentialGroup()
               .addGap(9, 9, 9)
               .addComponent(jLabel7)
               .addGap(48, 48, 48)))
         .addGap(118, 118, 118))
     );

     pack();
  }// </editor-fold>

  private void IDActionPerformed(java.awt.event.ActionEvent evt) {
     // TODO add your handling code here:
  }

  private void EXITActionPerformed(java.awt.event.ActionEvent evt) {
     // TODO add your handling code here:
     System.exit(0);
     //javax.swing.JOptionPane.showMessageDialog(null, "BYE"+NAME.getText());
  }

  private void RESETActionPerformed(java.awt.event.ActionEvent evt) {
     // TODO add your handling code here:
     ID.setText("");
     NAME.setText("");
     AGE.setText("");
     BRANCH.setText("");
     COUNTRY.setText("");
     PLACE.setText("");
     EMAIL.setText("");
     status.setText("");

  }

  private void comboActionPerformed(java.awt.event.ActionEvent evt) {
     // TODO add your handling code here:
      try
     {
         status.setText("");
     Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
     String url="jdbc:odbc:student";
     Connection con=DriverManager.getConnection(url,"","");
     Statement stmt=con.createStatement();
     String s="Select * from student where NAME='"+combo.getSelectedItem()+"'";
ResultSet rs=stmt.executeQuery(s);


// String FN="";

String I="";
String NM="";
String AG="";
String BR="";
String CR="";
String PL="";
String EM="";
String CRS="";
String DFB="";
String MFB="";
String YFB="";



while(rs.next()){

// FN=rs.getString("FIRSTNAME");
 I=rs.getString("ID");
 NM=rs.getString("NAME");
 AG=rs.getString("AGE");
 BR=rs.getString("BRANCH");
 CR=rs.getString("COUNTRY");
 PL=rs.getString("PLACE");
 EM=rs.getString("EMAIL");
 CRS=rs.getString("COURSE");
 DFB=rs.getString("DATE_");
 MFB=rs.getString("OF");
 YFB=rs.getString("BIRTH");
 }
 ID.setText(I);
 NAME.setText(NM);
 AGE.setText(AG);
 BRANCH.setText(BR);
 COUNTRY.setText(CR);
 PLACE.setText(PL);
 EMAIL.setText(EM);
 jLabel9.setText(CRS);
 BIRTH.setText(DFB);// BIRTH IS THE FIELD NAME ...
 BIRTH1.setText(MFB);
 BIRTH3.setText(YFB);
status1.setText("WELCOME "+NAME.getText()+"PLEASE UPDATE YOUR
ENTRIE!!!!!!!!!!");
     stmt.close();
     con.close();
     }
     catch(Exception e)
     {
     status.setText("Error In Loading...!");
     }
  }

  private void UPDATEActionPerformed(java.awt.event.ActionEvent evt) {
     // TODO add your handling code here:

     try {
        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
        String url="jdbc:odbc:student";
        Connection con=DriverManager.getConnection(url,"","");
        Statement stmt=con.createStatement();
        String s="Update student set ID='"+ID.getText()+"',NAME
='"+NAME.getText()+"',AGE='"+AGE.getText()+"',BRANCH='"+BRANCH.getText()+"',
COUNTRY='"+COUNTRY.getText()+"',PLACE='"+PLACE.getText()+"',EMAIL='"+EM
AIL.getText()+"' where NAME='"+combo.getSelectedItem()+"'";
        stmt.executeUpdate(s);
        javax.swing.JOptionPane.showMessageDialog(null,"Sucessfullly Updated...!");
        javax.swing.JOptionPane.showMessageDialog(null,"THANK YOU
"+NAME.getText()+"!!!!");
     } catch(Exception e) {
        status.setText("Error!");
     }
   }

  private void label1InputMethodTextChanged(java.awt.event.InputMethodEvent evt) {
     // TODO add your handling code here:
  }

  private void EMAILActionPerformed(java.awt.event.ActionEvent evt) {
     // TODO add your handling code here:
  }

  private void DELETEActionPerformed(java.awt.event.ActionEvent evt) {
     // TODO add your handling code here:
     try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
       String url="jdbc:odbc:student";
       Connection con=DriverManager.getConnection(url,"","");
       Statement stmt=con.createStatement();
       String d="DELETE from student where NAME='"+combo.getSelectedItem()+"'";
       stmt.executeUpdate(d);
       //ResultSet rs=stmt.executeQuery(d);
       javax.swing.JOptionPane.showMessageDialog(null, "ENTRY
"+NAME.getText()+" DELETED");
       combo.removeItem(combo.getSelectedItem());
    } catch(Exception e) {
       status.setText("Error!");
    }
  }

  /**
   * @param args the command line arguments
   */
  public static void main(String args[]) {
     java.awt.EventQueue.invokeLater(new Runnable() {
        public void run() {
          new s().setVisible(true);
        }
     });
  }

  // Variables declaration - do not modify
  private java.awt.TextField AGE;
  private javax.swing.JLabel BIRTH;
  private javax.swing.JLabel BIRTH1;
  private javax.swing.JLabel BIRTH2;
  private javax.swing.JLabel BIRTH3;
  private java.awt.TextField BRANCH;
  private java.awt.TextField COUNTRY;
  private javax.swing.JToggleButton DELETE;
  private java.awt.TextField EMAIL;
  private javax.swing.JButton EXIT;
  private java.awt.TextField ID;
  private java.awt.Label Label8;
  private javax.swing.JLabel NAME;
  private java.awt.TextField PLACE;
  private javax.swing.JButton RESET;
  private javax.swing.JToggleButton UPDATE;
  private javax.swing.JComboBox combo;
  private javax.swing.JLabel jLabel1;
  private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private java.awt.Label label1;
    private java.awt.Label label3;
    private java.awt.Label label4;
    private java.awt.Label label5;
    private java.awt.Label label6;
    private java.awt.Label label7;
    private java.awt.Label status;
    private javax.swing.JLabel status1;
    // End of variables declaration

}
                                          RESULT
CONCLUSION

 After we have completed the assignment we are sure that the problems in the existing system would
overcome. The “STUDENT APPLICATION FORM” process made computerized to reduce human
errors and to increase the efficiency. The main focus of this assignment is to lessen human efforts.
The maintenance of the records is made efficient, as all the records are stored in the ACCESS
database, through which data can be retrieved easily. The navigation control is provided in all the
forms to navigate through the large amount of records. The editing is also made simpler. The user
has to just type in the required field and press the submit button to get the desired information. Our
main aim of the assignment is to enter the details of the student and to get the correct information
about a particular student. The problems, which existed in the earlier system, have been removed to
a large extent. And it is expected that this assignment will go a long way in satisfying student’s
requirements.

Contenu connexe

Tendances

Stock Maintenance System-Problem Statement, SRS, ERD, DFD, Structured Chart
Stock Maintenance System-Problem Statement, SRS, ERD, DFD, Structured ChartStock Maintenance System-Problem Statement, SRS, ERD, DFD, Structured Chart
Stock Maintenance System-Problem Statement, SRS, ERD, DFD, Structured Chartgrandhiprasuna
 
Hotel Management System SRS
Hotel Management System SRS Hotel Management System SRS
Hotel Management System SRS Paras
 
SRS for Hospital Management System
SRS for Hospital Management SystemSRS for Hospital Management System
SRS for Hospital Management Systemkataria Arvind
 
Documentation of railway reservation system
Documentation of railway reservation systemDocumentation of railway reservation system
Documentation of railway reservation systemSandip Murari
 
Java PRACTICAL file
Java PRACTICAL fileJava PRACTICAL file
Java PRACTICAL fileRACHIT_GUPTA
 
Hostel management system srs
Hostel management system srsHostel management system srs
Hostel management system srshira akram
 
Student feedback system
Student feedback systemStudent feedback system
Student feedback systemshindept123
 
Student information system project report
Student information system project reportStudent information system project report
Student information system project reportSuman Chandra
 
Student Management System Project Abstract
Student Management System Project AbstractStudent Management System Project Abstract
Student Management System Project AbstractUdhayyagethan Mano
 
online examination portal project presentation
online examination portal project presentationonline examination portal project presentation
online examination portal project presentationShobhit Jain
 
Student Information System ( S.I.S. )
Student Information System ( S.I.S.  )Student Information System ( S.I.S.  )
Student Information System ( S.I.S. )Pulkiŧ Sharma
 
hospital management system
hospital management systemhospital management system
hospital management systemAnmol Purohit
 
Uml diagram for_hospital_management_system
Uml diagram for_hospital_management_systemUml diagram for_hospital_management_system
Uml diagram for_hospital_management_systemPradeep Bhosale
 
Minor project Report for "Quiz Application"
Minor project Report for "Quiz Application"Minor project Report for "Quiz Application"
Minor project Report for "Quiz Application"Harsh Verma
 
Student result mamagement
Student result mamagementStudent result mamagement
Student result mamagementMickey
 
Railway Reservation System - Software Engineering
Railway Reservation System - Software EngineeringRailway Reservation System - Software Engineering
Railway Reservation System - Software EngineeringLalit Pal
 
lake city institute of technology
lake city institute of technology lake city institute of technology
lake city institute of technology RaviKalola786
 

Tendances (20)

Stock Maintenance System-Problem Statement, SRS, ERD, DFD, Structured Chart
Stock Maintenance System-Problem Statement, SRS, ERD, DFD, Structured ChartStock Maintenance System-Problem Statement, SRS, ERD, DFD, Structured Chart
Stock Maintenance System-Problem Statement, SRS, ERD, DFD, Structured Chart
 
Hotel Management System SRS
Hotel Management System SRS Hotel Management System SRS
Hotel Management System SRS
 
SRS for Hospital Management System
SRS for Hospital Management SystemSRS for Hospital Management System
SRS for Hospital Management System
 
Documentation of railway reservation system
Documentation of railway reservation systemDocumentation of railway reservation system
Documentation of railway reservation system
 
Java PRACTICAL file
Java PRACTICAL fileJava PRACTICAL file
Java PRACTICAL file
 
Hospital management system
Hospital management systemHospital management system
Hospital management system
 
Hostel management system srs
Hostel management system srsHostel management system srs
Hostel management system srs
 
Student feedback system
Student feedback systemStudent feedback system
Student feedback system
 
Student information system project report
Student information system project reportStudent information system project report
Student information system project report
 
Student Management System Project Abstract
Student Management System Project AbstractStudent Management System Project Abstract
Student Management System Project Abstract
 
online examination portal project presentation
online examination portal project presentationonline examination portal project presentation
online examination portal project presentation
 
Student Information System ( S.I.S. )
Student Information System ( S.I.S.  )Student Information System ( S.I.S.  )
Student Information System ( S.I.S. )
 
hospital management system
hospital management systemhospital management system
hospital management system
 
Exam system
Exam systemExam system
Exam system
 
Uml diagram for_hospital_management_system
Uml diagram for_hospital_management_systemUml diagram for_hospital_management_system
Uml diagram for_hospital_management_system
 
Minor project Report for "Quiz Application"
Minor project Report for "Quiz Application"Minor project Report for "Quiz Application"
Minor project Report for "Quiz Application"
 
Student result mamagement
Student result mamagementStudent result mamagement
Student result mamagement
 
Railway Reservation System - Software Engineering
Railway Reservation System - Software EngineeringRailway Reservation System - Software Engineering
Railway Reservation System - Software Engineering
 
lake city institute of technology
lake city institute of technology lake city institute of technology
lake city institute of technology
 
School Management (c++)
School Management (c++) School Management (c++)
School Management (c++)
 

En vedette

Desktop Applications with NetBeans
Desktop Applications with NetBeansDesktop Applications with NetBeans
Desktop Applications with NetBeansHuu Bang Le Phan
 
GUI Programming using NetBeans (1).pptx
GUI Programming using NetBeans (1).pptxGUI Programming using NetBeans (1).pptx
GUI Programming using NetBeans (1).pptxSumalee Sonamthiang
 
Java Code for Sample Projects Loops
Java Code for Sample Projects LoopsJava Code for Sample Projects Loops
Java Code for Sample Projects Loopsjwjablonski
 
Unit 5-jdbc2
Unit 5-jdbc2Unit 5-jdbc2
Unit 5-jdbc2msafad
 
GUI Programming using NetBeans.pptx
GUI Programming using NetBeans.pptxGUI Programming using NetBeans.pptx
GUI Programming using NetBeans.pptxSumalee Sonamthiang
 
Motor Registration Authority - Excise & Taxation Solution
Motor Registration Authority - Excise & Taxation SolutionMotor Registration Authority - Excise & Taxation Solution
Motor Registration Authority - Excise & Taxation SolutionAsif Hussain
 
Water Distribution Control System
Water Distribution Control SystemWater Distribution Control System
Water Distribution Control SystemRehan Fazal
 
Methods in buisness research
Methods in buisness researchMethods in buisness research
Methods in buisness researchZariyanH
 
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERS
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERSPIC-MICROCONTROLLER TUTORIALS FOR BEGINNERS
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERSVISHNU KP
 
Mku virtual campus presentation
Mku virtual campus presentationMku virtual campus presentation
Mku virtual campus presentationsalesiokiura
 
Example for SDS document in Software engineering
Example for SDS document in Software engineeringExample for SDS document in Software engineering
Example for SDS document in Software engineeringRavi Yasas
 
Application Java swing : Gestion des réunion
Application Java swing : Gestion des réunionApplication Java swing : Gestion des réunion
Application Java swing : Gestion des réunionOussama Bessrour
 
Designing Teams for Emerging Challenges
Designing Teams for Emerging ChallengesDesigning Teams for Emerging Challenges
Designing Teams for Emerging ChallengesAaron Irizarry
 
How to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheHow to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheLeslie Samuel
 

En vedette (18)

Desktop Applications with NetBeans
Desktop Applications with NetBeansDesktop Applications with NetBeans
Desktop Applications with NetBeans
 
GUI Programming using NetBeans (1).pptx
GUI Programming using NetBeans (1).pptxGUI Programming using NetBeans (1).pptx
GUI Programming using NetBeans (1).pptx
 
Student Detail Form
Student Detail FormStudent Detail Form
Student Detail Form
 
Java Code for Sample Projects Loops
Java Code for Sample Projects LoopsJava Code for Sample Projects Loops
Java Code for Sample Projects Loops
 
Unit 5-jdbc2
Unit 5-jdbc2Unit 5-jdbc2
Unit 5-jdbc2
 
GUI Programming using NetBeans.pptx
GUI Programming using NetBeans.pptxGUI Programming using NetBeans.pptx
GUI Programming using NetBeans.pptx
 
Motor Registration Authority - Excise & Taxation Solution
Motor Registration Authority - Excise & Taxation SolutionMotor Registration Authority - Excise & Taxation Solution
Motor Registration Authority - Excise & Taxation Solution
 
Water Distribution Control System
Water Distribution Control SystemWater Distribution Control System
Water Distribution Control System
 
Embedded 2015
Embedded 2015Embedded 2015
Embedded 2015
 
Java swings
Java swingsJava swings
Java swings
 
Methods in buisness research
Methods in buisness researchMethods in buisness research
Methods in buisness research
 
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERS
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERSPIC-MICROCONTROLLER TUTORIALS FOR BEGINNERS
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERS
 
Mku virtual campus presentation
Mku virtual campus presentationMku virtual campus presentation
Mku virtual campus presentation
 
Example for SDS document in Software engineering
Example for SDS document in Software engineeringExample for SDS document in Software engineering
Example for SDS document in Software engineering
 
PROJET JAVA BD MySQL
PROJET JAVA BD MySQLPROJET JAVA BD MySQL
PROJET JAVA BD MySQL
 
Application Java swing : Gestion des réunion
Application Java swing : Gestion des réunionApplication Java swing : Gestion des réunion
Application Java swing : Gestion des réunion
 
Designing Teams for Emerging Challenges
Designing Teams for Emerging ChallengesDesigning Teams for Emerging Challenges
Designing Teams for Emerging Challenges
 
How to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheHow to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your Niche
 

Similaire à student application form Java Netbeans

SQLite Database Tutorial In Android
SQLite Database Tutorial In AndroidSQLite Database Tutorial In Android
SQLite Database Tutorial In AndroidAndroid 5
 
Placement project (2)on the basis of PPT
Placement project (2)on the basis of PPTPlacement project (2)on the basis of PPT
Placement project (2)on the basis of PPTHarshiHarshitha20
 
Final report mobile shop
Final report   mobile shopFinal report   mobile shop
Final report mobile shopViditsingh22
 
Mvc4 crud operations.-kemuning senja
Mvc4 crud operations.-kemuning senjaMvc4 crud operations.-kemuning senja
Mvc4 crud operations.-kemuning senjaalifha12
 
student database management system
student database management systemstudent database management system
student database management systemMd. Riadul Islam
 
MICROPROJECT_CSS resume.pdf client side scripting
MICROPROJECT_CSS resume.pdf client side scriptingMICROPROJECT_CSS resume.pdf client side scripting
MICROPROJECT_CSS resume.pdf client side scriptingvaijenathphad15
 
Student information system
Student information systemStudent information system
Student information systemSaqib Nadeem
 
studentinformationsystem-160525081807.pdf
studentinformationsystem-160525081807.pdfstudentinformationsystem-160525081807.pdf
studentinformationsystem-160525081807.pdfSayantanMajhi2
 
studentinformationsystem-160525081807.pdf
studentinformationsystem-160525081807.pdfstudentinformationsystem-160525081807.pdf
studentinformationsystem-160525081807.pdfSayantanMajhi2
 
studentinformationsystem-160525081807.pdf
studentinformationsystem-160525081807.pdfstudentinformationsystem-160525081807.pdf
studentinformationsystem-160525081807.pdfSayantanMajhi2
 
C++ student management system
C++ student management systemC++ student management system
C++ student management systemABHIJITPATRA23
 
Presentation of database management system
Presentation of database management systemPresentation of database management system
Presentation of database management systemMd. Touhidur Rahman
 
Tutorial mvc (pelajari ini jika ingin tahu mvc) keren
Tutorial mvc (pelajari ini jika ingin tahu mvc) kerenTutorial mvc (pelajari ini jika ingin tahu mvc) keren
Tutorial mvc (pelajari ini jika ingin tahu mvc) kerenSony Suci
 
60780174 49594067-cs1403-case-tools-lab-manual
60780174 49594067-cs1403-case-tools-lab-manual60780174 49594067-cs1403-case-tools-lab-manual
60780174 49594067-cs1403-case-tools-lab-manualChitrarasan Kathiravan
 
Student Management System
Student Management System Student Management System
Student Management System Vinay Yadav
 
COLLEGE PROJECT MANAGEMENT SYSTEM
COLLEGE PROJECT MANAGEMENT SYSTEMCOLLEGE PROJECT MANAGEMENT SYSTEM
COLLEGE PROJECT MANAGEMENT SYSTEMIRJET Journal
 
Cis 247 all i labs
Cis 247 all i labsCis 247 all i labs
Cis 247 all i labsccis224477
 
College management-system
College management-systemCollege management-system
College management-systemkarthik10435
 

Similaire à student application form Java Netbeans (20)

SQLite Database Tutorial In Android
SQLite Database Tutorial In AndroidSQLite Database Tutorial In Android
SQLite Database Tutorial In Android
 
Placement project (2)on the basis of PPT
Placement project (2)on the basis of PPTPlacement project (2)on the basis of PPT
Placement project (2)on the basis of PPT
 
Final report mobile shop
Final report   mobile shopFinal report   mobile shop
Final report mobile shop
 
Mvc4 crud operations.-kemuning senja
Mvc4 crud operations.-kemuning senjaMvc4 crud operations.-kemuning senja
Mvc4 crud operations.-kemuning senja
 
student database management system
student database management systemstudent database management system
student database management system
 
MICROPROJECT_CSS resume.pdf client side scripting
MICROPROJECT_CSS resume.pdf client side scriptingMICROPROJECT_CSS resume.pdf client side scripting
MICROPROJECT_CSS resume.pdf client side scripting
 
Student information system
Student information systemStudent information system
Student information system
 
studentinformationsystem-160525081807.pdf
studentinformationsystem-160525081807.pdfstudentinformationsystem-160525081807.pdf
studentinformationsystem-160525081807.pdf
 
studentinformationsystem-160525081807.pdf
studentinformationsystem-160525081807.pdfstudentinformationsystem-160525081807.pdf
studentinformationsystem-160525081807.pdf
 
studentinformationsystem-160525081807.pdf
studentinformationsystem-160525081807.pdfstudentinformationsystem-160525081807.pdf
studentinformationsystem-160525081807.pdf
 
Academic management
Academic managementAcademic management
Academic management
 
C++ student management system
C++ student management systemC++ student management system
C++ student management system
 
School Management System
School Management SystemSchool Management System
School Management System
 
Presentation of database management system
Presentation of database management systemPresentation of database management system
Presentation of database management system
 
Tutorial mvc (pelajari ini jika ingin tahu mvc) keren
Tutorial mvc (pelajari ini jika ingin tahu mvc) kerenTutorial mvc (pelajari ini jika ingin tahu mvc) keren
Tutorial mvc (pelajari ini jika ingin tahu mvc) keren
 
60780174 49594067-cs1403-case-tools-lab-manual
60780174 49594067-cs1403-case-tools-lab-manual60780174 49594067-cs1403-case-tools-lab-manual
60780174 49594067-cs1403-case-tools-lab-manual
 
Student Management System
Student Management System Student Management System
Student Management System
 
COLLEGE PROJECT MANAGEMENT SYSTEM
COLLEGE PROJECT MANAGEMENT SYSTEMCOLLEGE PROJECT MANAGEMENT SYSTEM
COLLEGE PROJECT MANAGEMENT SYSTEM
 
Cis 247 all i labs
Cis 247 all i labsCis 247 all i labs
Cis 247 all i labs
 
College management-system
College management-systemCollege management-system
College management-system
 

student application form Java Netbeans

  • 1. STUDENT APPLICATION FORM RESHMA JOHNEY ROLL NO:24 Submitted to MISS Divya James Submitted on 1-11-2010
  • 2. STUDENT APPLICATON FORM RESHMA JOHNEY Second year, Rajagiri School of Engineering and Technology KAKANAD, ERNAKULAM reshmajohney@yahoo.com “STUDENT APPLICATION FORM” aims at developing student application form where we can easily store the details of a new student and retrieve the details of student thereby. When a student comes, we can enter the details of the student in the student application form and can easily update the details of the student when required. In this assignment, an additional facility is given where we can delete the details of a student when a need arises. The assignment is very useful and proper validation is given for each field and hopes that the computerization of the Student Application Form will not only improves the efficiency but will also reduce human stress thereby indirectly improving human recourses.
  • 3. INDEX Sl.No: TOPICS Page_no: 1 Problem definition 3 2 Theoretical Background 3-4 3 Table Design 6-7 4 Program code 8-44 5 Result 44-49 6 Conclusion 50 I. PROBLEM DEFINTION The Student Application form is designed & developed for the proper entry and updation of student’s details. The Student details are entered in Student Entry form and these corresponding student details are entered to a database using ODBC connectivity. When a student wishes to update the details, he can update the details using an updating form. And the updated details will be also updated to the database. There is another option is given in which student can delete his account and these changes will directly reflect in the database. i. II. THEORETICAL BACKGROUND The entire code is done with java swing controls. Swing, which is an extension library to the AWT, includes new and improved components that enhance the look and functionality of GUIs. Swing can be used to build Standalone swing GUIs Apps. It employs model/view design architecture. Swing is more portable and more flexible than AWT. Swing is built on top of AWT and is entirely written in Java, using AWT’s lightweight component support. In particular, unlike AWT, the architecture of Swing components makes it easy to customize both their appearance and behavior. Components from AWT and Swing can be mixed, allowing you to add Swing support to existing AWT-based programs. For example, swing components such as JSlider, JButton and JCheckbox could be used in the same program with standard AWT labels, textfields and scrollbars. You could subclass the existingSwing UI, model, or change listener classes without having to reinvent the entire implementation. Swing also has the ability to replace these objects on-the-fly.
  • 4. Form is designed for selection of the different Menus. Following forms are mainly used:- 1. Application Form 2 Updating Form a) Update b) Deletion And the form design is a follows… STUDENT ENTRY FORM As said earlier, the student application form has the following options ‘SUBMIT’, ‘UPDATE’, ‘RESET’, ‘EXIT’.
  • 5. UPDATION FORM By clicking the menu ‘UPDATE, the form will direct in to another form named “UPDATON FORM” and this form can used as a means for updating the student details if required. By clicking the ‘UPDATE’ Menu of the first form (student application form) the above form will be displayed for the updating facility. Following fields have been provided for the entry of the updated information:-
  • 6. 1. ID. 2. NAME. 3. COURSE. (Where we cannot change the value of ID, NAME, AND COURSE). 4. AGE. 5. BRANCH. 6. COUNTRY. 7. PLACE. 8. E-mail ID. 9. DATE OF BIRTH. (cannot change the value) In addition, clear, delete user, update, exit buttons and a combo box is also provided in order to select the student name from database have been provided in the form. BOOK DELETE By clicking the Delete Menu of the updating form, the selected user account and his details will be deleted from the database using the query: String d="DELETE from student where NAME='"+combo.getSelectedItem () +"'"; Table Design Every form is linked to a database (Microsoft Access 2010) form. And table design for form is given as follows. student FIELD NAME DATATYPE ID AuoNumber NAME Text AGE Number DATE_OF_BIRTH Number BRANCH Text COUNTRY Text PLACE Text
  • 7. EMAIL Text COURCE Text The database is given below..
  • 8. PROGRAM CODE PROGRAM CODE FOR STUDENT APPLICATION FORM CODE: /* * NewJFrame.java(the name of my java file which is used to enter the details of student * * Created on October 13, 2010, 8:59 AM */ //package student_application_form; import java.sql.*; /** * * @author RESHMA */ public class NewJFrame extends javax.swing.JFrame { /** Creates new form NewJFrame */ public NewJFrame() { initComponents(); load_date(); load_cource(); } public void load_cource() { course_combo .addItem("B Tech"); course_combo.addItem("M Tech"); course_combo.addItem("MCA"); } public void load_date() { int i; for( i=1;i<=31;i++){ date_combo.addItem(i); } for( i=1;i<=12;i++){ month_combo.addItem(i); } for( i=1980;i<=2010;i++){ year_combo.addItem(i); }
  • 9. } /** 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. */ // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { buttonGroup1 = new javax.swing.ButtonGroup(); buttonGroup2 = new javax.swing.ButtonGroup(); label1 = new java.awt.Label(); label2 = new java.awt.Label(); NAME = new java.awt.TextField(); label3 = new java.awt.Label(); AGE = new java.awt.TextField(); label4 = new java.awt.Label(); BRANCH = new java.awt.TextField(); label5 = new java.awt.Label(); COUNTRY = new java.awt.TextField(); label6 = new java.awt.Label(); PLACE = new java.awt.TextField(); label7 = new java.awt.Label(); EMAIL = new java.awt.TextField(); RESET = new javax.swing.JButton(); submit = new javax.swing.JButton(); EXIT = new javax.swing.JButton(); Success = new java.awt.Label(); Label8 = new java.awt.Label(); ID = new java.awt.TextField(); UPDATE = new javax.swing.JToggleButton(); age_status = new java.awt.Label(); jLabel1 = new javax.swing.JLabel(); name_status = new java.awt.Label(); jLabel2 = new javax.swing.JLabel(); status1 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); month_combo = new javax.swing.JComboBox(); date_combo = new javax.swing.JComboBox(); year_combo = new javax.swing.JComboBox(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); course_combo = new javax.swing.JComboBox();
  • 10. setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setBackground(new java.awt.Color(102, 255, 255)); setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); setForeground(new java.awt.Color(204, 51, 255)); label1.setAlignment(java.awt.Label.CENTER); label1.setBackground(new java.awt.Color(255, 102, 153)); label1.setForeground(new java.awt.Color(51, 255, 51)); label1.setText("STUDENT ENTRY FORM"); label1.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { label1MouseClicked(evt); } }); label1.addComponentListener(new java.awt.event.ComponentAdapter() { public void componentHidden(java.awt.event.ComponentEvent evt) { label1ComponentHidden(evt); } }); label1.addHierarchyListener(new java.awt.event.HierarchyListener() { public void hierarchyChanged(java.awt.event.HierarchyEvent evt) { label1HierarchyChanged(evt); } }); label2.setText("NAME :"); NAME.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { NAMEActionPerformed(evt); } }); NAME.addFocusListener(new java.awt.event.FocusAdapter() { public void focusLost(java.awt.event.FocusEvent evt) { NAMEFocusLost(evt); } }); label3.setText(" AGE :"); AGE.addFocusListener(new java.awt.event.FocusAdapter() { public void focusLost(java.awt.event.FocusEvent evt) { AGEFocusLost(evt); } });
  • 11. label4.setText("BRANCH:"); BRANCH.addFocusListener(new java.awt.event.FocusAdapter() { public void focusLost(java.awt.event.FocusEvent evt) { BRANCHFocusLost(evt); } }); label5.setText("COUNTRY"); COUNTRY.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { COUNTRYActionPerformed(evt); } }); COUNTRY.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { COUNTRYFocusGained(evt); } public void focusLost(java.awt.event.FocusEvent evt) { COUNTRYFocusLost(evt); } }); label6.setText("PLACE"); label7.setText("E-mail ID"); RESET.setBackground(new java.awt.Color(255, 51, 255)); RESET.setForeground(new java.awt.Color(51, 255, 51)); RESET.setText("RESET"); RESET.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { RESETActionPerformed(evt); } }); submit.setBackground(new java.awt.Color(255, 51, 255)); submit.setForeground(new java.awt.Color(51, 255, 51)); submit.setText("SUBMIT"); submit.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 51, 51))); submit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { submitActionPerformed(evt);
  • 12. } }); submit.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { submitFocusGained(evt); } }); EXIT.setBackground(new java.awt.Color(255, 0, 255)); EXIT.setForeground(new java.awt.Color(51, 255, 51)); EXIT.setText("EXIT"); EXIT.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { EXITActionPerformed(evt); } }); Label8.setText("ID"); ID.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { IDActionPerformed(evt); } }); ID.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { IDFocusGained(evt); } public void focusLost(java.awt.event.FocusEvent evt) { IDFocusLost(evt); } }); UPDATE.setBackground(new java.awt.Color(255, 0, 255)); UPDATE.setForeground(new java.awt.Color(102, 255, 51)); UPDATE.setText("UPDATE"); UPDATE.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { UPDATEActionPerformed(evt); } }); status1.setBackground(new java.awt.Color(51, 0, 204)); status1.setFont(new java.awt.Font("Traditional Arabic", 0, 36)); status1.setForeground(new java.awt.Color(51, 0, 51));
  • 13. jLabel3.setText("DOB:"); jLabel4.setText("D"); jLabel5.setText("M"); jLabel6.setText("Y"); jLabel7.setText("COURSE"); course_combo.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { course_comboActionPerformed(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() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel1) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(8, 8, 8) .addComponent(jLabel3)) .addGroup(layout.createSequentialGroup() .addGap(18, 18, 18) .addComponent(Label8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(label5, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  • 14. .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(AGE, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(ID, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(age_status, javax.swing.GroupLayout.DEFAULT_SIZE, 132, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)) .addGroup(layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(PLACE, javax.swing.GroupLayout.PREFERRED_SIZE, 156, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createSequentialGroup() .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 7, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(date_combo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel5) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(month_combo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
  • 15. .addComponent(jLabel6) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(year_combo, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(12, 12, 12)))) .addGroup(layout.createSequentialGroup() .addComponent(label3, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() .addGap(116, 116, 116) .addComponent(jLabel2)) .addGroup(layout.createSequentialGroup() .addGap(144, 144, 144) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 250, Short.MAX_VALUE) .addComponent(name_status, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(COUNTRY, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(NAME, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 164, Short.MAX_VALUE))
  • 16. .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(BRANCH, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(EMAIL, javax.swing.GroupLayout.DEFAULT_SIZE, 171, Short.MAX_VALUE) .addComponent(course_combo, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)))))) .addGroup(layout.createSequentialGroup() .addGap(51, 51, 51) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(label7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(label2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(label6, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(label4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 326, Short.MAX_VALUE))) .addGap(68, 68, 68))) .addGap(591, 591, 591)) .addGroup(layout.createSequentialGroup() .addGap(158, 158, 158) .addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE, 334, javax.swing.GroupLayout.PREFERRED_SIZE)
  • 17. .addContainerGap(894, Short.MAX_VALUE)) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(201, 201, 201) .addComponent(EXIT, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(submit, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(RESET)) .addGroup(layout.createSequentialGroup() .addGap(208, 208, 208) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(Success, javax.swing.GroupLayout.PREFERRED_SIZE, 243, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(UPDATE, javax.swing.GroupLayout.PREFERRED_SIZE, 217, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addContainerGap(910, Short.MAX_VALUE)) .addGroup(layout.createSequentialGroup() .addGap(172, 172, 172) .addComponent(status1, javax.swing.GroupLayout.PREFERRED_SIZE, 445, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(769, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(28, 28, 28) .addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(25, 25, 25) .addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(name_status, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel1)) .addGap(24, 24, 24)
  • 18. .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(label2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(NAME, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(COUNTRY, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 18, Short.MAX_VALUE) .addComponent(EMAIL, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(label6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 18, Short.MAX_VALUE) .addComponent(label7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
  • 19. .addComponent(age_status, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(label3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(AGE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(PLACE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(label5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGap(13, 13, 13)) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(ID, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(Label8, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(30, 30, 30))) .addGap(10, 10, 10) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3) .addComponent(jLabel4) .addComponent(date_combo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel5) .addComponent(month_combo, javax.swing.GroupLayout.PREFERRED_SIZE,
  • 20. javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel6) .addComponent(year_combo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(label4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(BRANCH, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(course_combo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel7)) .addGap(37, 37, 37) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(submit, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(RESET) .addComponent(EXIT)) .addGap(18, 18, 18) .addComponent(UPDATE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(Success, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(55, 55, 55) .addComponent(status1, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(342, Short.MAX_VALUE)) ); pack(); }// </editor-fold> private void NAMEActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: }
  • 21. private void RESETActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: ID.setText(""); NAME.setText(""); AGE.setText(""); BRANCH.setText(""); COUNTRY.setText(""); PLACE.setText(""); EMAIL.setText(""); Success.setText(""); age_status.setText(""); status1.setText(""); } private void submitActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: javax.swing.JOptionPane.showMessageDialog(null, "CHECK ALL FIELDS ONCE AGAIN BEFORE LOGIN "); try{ String aa=""; Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String url="jdbc:odbc:student"; Connection con=DriverManager.getConnection(url); Statement stmt=con.createStatement(); String new_user=""; String user=NAME.getText().trim(); ResultSet rs=stmt.executeQuery("select * from student where ID='"+ID.getText()+"'"); while(rs.next()) { aa=rs.getString("ID"); } if((ID.getText().equals(""))){ Success.setText("Invalid Please provide a ID!"); } else if((ID.getText().equals(aa))){ Success.setText("ID Already exists"); } else{ String s="Insert into student(ID,NAME,AGE,BRANCH,COUNTRY,PLACE,EMAIL,COURSE,DATE_,OF,BI
  • 22. RTH) values('"+ID.getText()+"','"+NAME.getText()+"','"+AGE.getText()+"','"+BRANCH.getTe xt()+"','"+COUNTRY.getText()+"','"+PLACE.getText()+"','"+EMAIL.getText()+"','"+cour se_combo.getSelectedItem()+"','"+date_combo.getSelectedItem()+"','"+month_combo.getS electedItem()+"','"+year_combo.getSelectedItem()+"')"; stmt.executeUpdate(s); Success.setText("SuccessFully Inserted....!"); //Success.setText("New User added"); javax.swing.JOptionPane.showMessageDialog(null, "NEW USER ADDED!..........."); } stmt.close(); } catch(Exception e) { Success.setText("Error in Loading.....!"); } } private void EXITActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: System.exit(0); } private void IDActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: } private void UPDATEActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: dispose(); new s().setVisible(true); } private void AGEFocusLost(java.awt.event.FocusEvent evt) {
  • 23. // TODO add your handling code here: try { String check_age; int m; check_age=AGE.getText(); if(check_age.equals("")) { Success.setText(""); } else { m=Integer.parseInt(AGE.getText()); if(m>30) { javax.swing.JOptionPane.showMessageDialog(null, "STUDENTS CANT HAVE AN AGE ABOVE 30"); age_status.setText("INVALID"); AGE.setText(""); } else if (m< 1) { javax.swing.JOptionPane.showMessageDialog(null, "ENTER AGE PROPER .."); AGE.setText(""); age_status.setText("INVALID"); } else { age_status.setText(""); } } } catch(NumberFormatException e) { Success.setText("AGE SHOULD BE AN INTEGER!!!!" );
  • 24. } catch(Exception e) { age_status.setText("INVALID"); } } private void IDFocusLost(java.awt.event.FocusEvent evt) { // TODO add your handling code here: try{ String id=""; if(ID.getText().equals("")) { Success.setText(""); } else{ id=ID.getText(); int a=Integer.parseInt(id); // javax.swing.JOptionPane.showMessageDialog(null, "U CHOOSEN "+ID.getText()+" "); } } catch(NumberFormatException e) { javax.swing.JOptionPane.showMessageDialog(null, "ID SHOULD BE AN INTEGER!!!!" ); ID.setText(""); } } private void BRANCHFocusLost(java.awt.event.FocusEvent evt) { // TODO add your handling code here: String brh=""; brh=BRANCH.getText(); if(brh.equals("")) { Success.setText("CHOOSE A BRANCH");
  • 25. } else{ //int a; // a=Integer.parseInt(brh); javax.swing.JOptionPane.showMessageDialog(null, "U CHOOSEN "+BRANCH.getText()+" BRANCH"); } } private void submitFocusGained(java.awt.event.FocusEvent evt) { // TODO add your handling code here: // javax.swing.JOptionPane.showMessageDialog(null, "CHECK ALL FIELDS ONCE AGAIN BEFORE LOGIN "); // dispose(); } private void NAMEFocusLost(java.awt.event.FocusEvent evt) { // TODO add your handling code here: status1.setText("WELCOME "+NAME.getText()+"!!!!!!!!!!"); /* String name_check; name_check=NAME.getText(); if(name_check<99999&&name_check>1) { javax.swing.JOptionPane.showMessageDialog(null, "NAME IS INVLAID ..NAME CANNOT HAVE INTEGER VALUES"); NAME.setText(""); name_status.setText("INVALID"); } */ } private void label1ComponentHidden(java.awt.event.ComponentEvent evt) { // TODO add your handling code here: } private void IDFocusGained(java.awt.event.FocusEvent evt) { // TODO add your handling code here:
  • 26. } private void label1HierarchyChanged(java.awt.event.HierarchyEvent evt) { // TODO add your handling code here: } private void label1MouseClicked(java.awt.event.MouseEvent evt) { // TODO add your handling code here: } private void COUNTRYFocusGained(java.awt.event.FocusEvent evt) { // TODO add your handling code here: } private void COUNTRYFocusLost(java.awt.event.FocusEvent evt) { // TODO add your handling code here: Success.setText(""); } private void COUNTRYActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: } private void course_comboActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: /*course_combo .addItem("B Tech"); course_combo.addItem("M Tech"); course_combo.addItem("MCA");*/ } /** * @param args the command line arguments */ public static void main(String args[]) { java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new NewJFrame().setVisible(true); } }); }
  • 27. // Variables declaration - do not modify private java.awt.TextField AGE; private java.awt.TextField BRANCH; private java.awt.TextField COUNTRY; private java.awt.TextField EMAIL; private javax.swing.JButton EXIT; private java.awt.TextField ID; private java.awt.Label Label8; private java.awt.TextField NAME; private java.awt.TextField PLACE; private javax.swing.JButton RESET; private java.awt.Label Success; private javax.swing.JToggleButton UPDATE; private java.awt.Label age_status; private javax.swing.ButtonGroup buttonGroup1; private javax.swing.ButtonGroup buttonGroup2; private javax.swing.JComboBox course_combo; private javax.swing.JComboBox date_combo; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel4; private javax.swing.JLabel jLabel5; private javax.swing.JLabel jLabel6; private javax.swing.JLabel jLabel7; private java.awt.Label label1; private java.awt.Label label2; private java.awt.Label label3; private java.awt.Label label4; private java.awt.Label label5; private java.awt.Label label6; private java.awt.Label label7; private javax.swing.JComboBox month_combo; private java.awt.Label name_status; private javax.swing.JLabel status1; private javax.swing.JButton submit; private javax.swing.JComboBox year_combo; // End of variables declaration } PROGRAM CODE FOR UPDATION FORM CODE: // the name of my java file is s.java
  • 28. /* * s.java * * Created on October 17, 2010, 10:11 PM */ import java.sql.*; /** * * @author RESHMA */ public class s_1 extends javax.swing.JFrame { /** Creates new form s */ public s_1() { initComponents(); loaddetails(); } public void loaddetails() { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String url="jdbc:odbc:student"; Connection con=DriverManager.getConnection(url,"",""); Statement stmt=con.createStatement(); String sql="Select NAME from student"; ResultSet rs=stmt.executeQuery(sql); while(rs.next()) { combo.addItem(rs.getString(1)); } status1.setText("WELCOME "+NAME.getText()+"PLEASE UPDATE YOUR ENTRIES !!!!!!!!!!"); stmt.close(); con.close(); } catch(Exception e) { javax.swing.JOptionPane.showMessageDialog(null, "Error...!"); } } /** This method is called from within the constructor to * initialize the form.
  • 29. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { status = new java.awt.Label(); label1 = new java.awt.Label(); Label8 = new java.awt.Label(); label3 = new java.awt.Label(); label4 = new java.awt.Label(); label5 = new java.awt.Label(); label6 = new java.awt.Label(); label7 = new java.awt.Label(); ID = new java.awt.TextField(); AGE = new java.awt.TextField(); BRANCH = new java.awt.TextField(); COUNTRY = new java.awt.TextField(); PLACE = new java.awt.TextField(); EMAIL = new java.awt.TextField(); EXIT = new javax.swing.JButton(); RESET = new javax.swing.JButton(); combo = new javax.swing.JComboBox(); UPDATE = new javax.swing.JToggleButton(); DELETE = new javax.swing.JToggleButton(); jLabel1 = new javax.swing.JLabel(); status1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); jLabel8 = new javax.swing.JLabel(); BIRTH = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); BIRTH1 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); BIRTH2 = new javax.swing.JLabel(); BIRTH3 = new javax.swing.JLabel(); jLabel9 = new javax.swing.JLabel(); NAME = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setBackground(new java.awt.Color(143, 115, 132)); setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); setForeground(new java.awt.Color(50, 0, 50));
  • 30. label1.setAlignment(java.awt.Label.CENTER); label1.setBackground(new java.awt.Color(255, 51, 255)); label1.setFont(new java.awt.Font("Andalus", 2, 18)); label1.setForeground(new java.awt.Color(102, 102, 0)); label1.setText("UPDATION FORM"); label1.addInputMethodListener(new java.awt.event.InputMethodListener() { public void caretPositionChanged(java.awt.event.InputMethodEvent evt) { } public void inputMethodTextChanged(java.awt.event.InputMethodEvent evt) { label1InputMethodTextChanged(evt); } }); Label8.setFont(new java.awt.Font("Andalus", 0, 12)); Label8.setForeground(new java.awt.Color(255, 102, 255)); Label8.setText("ID"); label3.setFont(new java.awt.Font("Andalus", 0, 12)); label3.setForeground(new java.awt.Color(255, 102, 255)); label3.setText(" AGE :"); label4.setFont(new java.awt.Font("Andalus", 0, 12)); label4.setForeground(new java.awt.Color(255, 102, 255)); label4.setText("BRANCH:"); label5.setFont(new java.awt.Font("Andalus", 0, 12)); label5.setForeground(new java.awt.Color(255, 102, 255)); label5.setText("COUNTRY"); label6.setFont(new java.awt.Font("Andalus", 0, 12)); label6.setForeground(new java.awt.Color(255, 102, 255)); label6.setText("PLACE"); label7.setFont(new java.awt.Font("Andalus", 0, 12)); label7.setForeground(new java.awt.Color(255, 102, 255)); label7.setText("E-mail ID"); ID.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { IDActionPerformed(evt); } }); EMAIL.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { EMAILActionPerformed(evt);
  • 31. } }); EXIT.setBackground(new java.awt.Color(0, 51, 255)); EXIT.setFont(new java.awt.Font("Andalus", 0, 11)); EXIT.setForeground(new java.awt.Color(255, 255, 51)); EXIT.setText("EXIT"); EXIT.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { EXITActionPerformed(evt); } }); RESET.setBackground(new java.awt.Color(51, 51, 255)); RESET.setFont(new java.awt.Font("Andalus", 0, 12)); RESET.setForeground(new java.awt.Color(255, 255, 0)); RESET.setText("CLEAR"); RESET.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { RESETActionPerformed(evt); } }); combo.setBackground(new java.awt.Color(255, 204, 204)); combo.setFont(new java.awt.Font("Andalus", 0, 11)); combo.setForeground(new java.awt.Color(255, 255, 51)); combo.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { comboActionPerformed(evt); } }); UPDATE.setBackground(new java.awt.Color(0, 51, 255)); UPDATE.setFont(new java.awt.Font("Andalus", 0, 11)); UPDATE.setForeground(new java.awt.Color(255, 255, 51)); UPDATE.setText("UPDATE"); UPDATE.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { UPDATEActionPerformed(evt); } }); DELETE.setBackground(new java.awt.Color(0, 51, 255)); DELETE.setFont(new java.awt.Font("Andalus", 0, 11)); DELETE.setForeground(new java.awt.Color(255, 255, 51)); DELETE.setText("DELETE USER");
  • 32. DELETE.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { DELETEActionPerformed(evt); } }); jLabel1.setFont(new java.awt.Font("Andalus", 0, 12)); jLabel1.setForeground(new java.awt.Color(255, 51, 204)); jLabel1.setText("STUDENT NAME"); status1.setFont(new java.awt.Font("Andalus", 0, 11)); jLabel2.setFont(new java.awt.Font("Andalus", 0, 12)); jLabel2.setForeground(new java.awt.Color(255, 102, 255)); jLabel2.setText("NAME :"); jLabel3.setFont(new java.awt.Font("Andalus", 0, 12)); jLabel3.setForeground(new java.awt.Color(255, 102, 255)); jLabel3.setText("COURSE"); jLabel4.setFont(new java.awt.Font("Andalus", 0, 11)); jLabel4.setForeground(new java.awt.Color(255, 51, 255)); jLabel4.setText("DATE OF BIRTH"); jLabel5.setText("-"); jLabel6.setText("-"); NAME.setFont(new java.awt.Font("Andalus", 0, 12)); NAME.setForeground(new java.awt.Color(102, 102, 255)); 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() .addGap(151, 151, 151) .addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE, 270, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGap(129, 129, 129) .addComponent(status1, javax.swing.GroupLayout.PREFERRED_SIZE, 412, javax.swing.GroupLayout.PREFERRED_SIZE))
  • 33. .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() .addGap(22, 22, 22) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(label6, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(label7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createSequentialGroup() .addComponent(label5, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)) .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, 95, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup() .addComponent(jLabel2) .addGap(18, 18, 18)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(Label8, javax.swing.GroupLayout.DEFAULT_SIZE, 61, Short.MAX_VALUE) .addGap(34, 34, 34)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(label3, javax.swing.GroupLayout.DEFAULT_SIZE, 71, Short.MAX_VALUE) .addGap(24, 24, 24)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(label4, javax.swing.GroupLayout.DEFAULT_SIZE, 69, Short.MAX_VALUE) .addGap(26, 26, 26))) .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE))
  • 34. .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(EMAIL, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(COUNTRY, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(PLACE, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 191, Short.MAX_VALUE) .addComponent(BRANCH, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(91, 91, 91) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(BIRTH2, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGap(123, 123, 123) .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGroup(layout.createSequentialGroup() .addComponent(BIRTH, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 12, javax.swing.GroupLayout.PREFERRED_SIZE)
  • 35. .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(BIRTH1, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(BIRTH3, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jLabel9) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() .addComponent(ID, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(130, 130, 130) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(combo, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(NAME, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(AGE, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 119, Short.MAX_VALUE)
  • 36. .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(layout.createSequentialGroup() .addComponent(DELETE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)) .addComponent(EXIT, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(UPDATE, javax.swing.GroupLayout.DEFAULT_SIZE, 144, Short.MAX_VALUE) .addComponent(RESET, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))) .addGap(139, 139, 139)) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() .addGap(284, 284, 284) .addComponent(jLabel7))) .addGap(367, 367, 367))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGap(82, 82, 82) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createSequentialGroup() .addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(status1, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
  • 37. .addComponent(ID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(combo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addComponent(Label8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2) .addComponent(NAME, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(label3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  • 38. .addComponent(AGE, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(layout.createSequentialGroup() .addComponent(RESET, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(DELETE, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(20, 20, 20) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(BRANCH, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(label4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(17, 17, 17) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(COUNTRY, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(label5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(PLACE, javax.swing.GroupLayout.DEFAULT_SIZE, 24, Short.MAX_VALUE) .addComponent(label6, 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.TRAILING)
  • 39. .addComponent(label7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(EMAIL, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(layout.createSequentialGroup() .addComponent(UPDATE, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(EXIT, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(10, 10, 10) .addComponent(jLabel8) .addGap(8, 8, 8) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(BIRTH2) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 16, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel5) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(BIRTH, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 23, Short.MAX_VALUE)) .addComponent(BIRTH1, javax.swing.GroupLayout.DEFAULT_SIZE, 23, Short.MAX_VALUE) .addComponent(jLabel6)
  • 40. .addComponent(BIRTH3, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))))) .addGroup(layout.createSequentialGroup() .addGap(9, 9, 9) .addComponent(jLabel7) .addGap(48, 48, 48))) .addGap(118, 118, 118)) ); pack(); }// </editor-fold> private void IDActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: } private void EXITActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: System.exit(0); //javax.swing.JOptionPane.showMessageDialog(null, "BYE"+NAME.getText()); } private void RESETActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: ID.setText(""); NAME.setText(""); AGE.setText(""); BRANCH.setText(""); COUNTRY.setText(""); PLACE.setText(""); EMAIL.setText(""); status.setText(""); } private void comboActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: try { status.setText(""); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String url="jdbc:odbc:student"; Connection con=DriverManager.getConnection(url,"",""); Statement stmt=con.createStatement(); String s="Select * from student where NAME='"+combo.getSelectedItem()+"'";
  • 41. ResultSet rs=stmt.executeQuery(s); // String FN=""; String I=""; String NM=""; String AG=""; String BR=""; String CR=""; String PL=""; String EM=""; String CRS=""; String DFB=""; String MFB=""; String YFB=""; while(rs.next()){ // FN=rs.getString("FIRSTNAME"); I=rs.getString("ID"); NM=rs.getString("NAME"); AG=rs.getString("AGE"); BR=rs.getString("BRANCH"); CR=rs.getString("COUNTRY"); PL=rs.getString("PLACE"); EM=rs.getString("EMAIL"); CRS=rs.getString("COURSE"); DFB=rs.getString("DATE_"); MFB=rs.getString("OF"); YFB=rs.getString("BIRTH"); } ID.setText(I); NAME.setText(NM); AGE.setText(AG); BRANCH.setText(BR); COUNTRY.setText(CR); PLACE.setText(PL); EMAIL.setText(EM); jLabel9.setText(CRS); BIRTH.setText(DFB);// BIRTH IS THE FIELD NAME ... BIRTH1.setText(MFB); BIRTH3.setText(YFB);
  • 42. status1.setText("WELCOME "+NAME.getText()+"PLEASE UPDATE YOUR ENTRIE!!!!!!!!!!"); stmt.close(); con.close(); } catch(Exception e) { status.setText("Error In Loading...!"); } } private void UPDATEActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String url="jdbc:odbc:student"; Connection con=DriverManager.getConnection(url,"",""); Statement stmt=con.createStatement(); String s="Update student set ID='"+ID.getText()+"',NAME ='"+NAME.getText()+"',AGE='"+AGE.getText()+"',BRANCH='"+BRANCH.getText()+"', COUNTRY='"+COUNTRY.getText()+"',PLACE='"+PLACE.getText()+"',EMAIL='"+EM AIL.getText()+"' where NAME='"+combo.getSelectedItem()+"'"; stmt.executeUpdate(s); javax.swing.JOptionPane.showMessageDialog(null,"Sucessfullly Updated...!"); javax.swing.JOptionPane.showMessageDialog(null,"THANK YOU "+NAME.getText()+"!!!!"); } catch(Exception e) { status.setText("Error!"); } } private void label1InputMethodTextChanged(java.awt.event.InputMethodEvent evt) { // TODO add your handling code here: } private void EMAILActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: } private void DELETEActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: try {
  • 43. Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String url="jdbc:odbc:student"; Connection con=DriverManager.getConnection(url,"",""); Statement stmt=con.createStatement(); String d="DELETE from student where NAME='"+combo.getSelectedItem()+"'"; stmt.executeUpdate(d); //ResultSet rs=stmt.executeQuery(d); javax.swing.JOptionPane.showMessageDialog(null, "ENTRY "+NAME.getText()+" DELETED"); combo.removeItem(combo.getSelectedItem()); } catch(Exception e) { status.setText("Error!"); } } /** * @param args the command line arguments */ public static void main(String args[]) { java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new s().setVisible(true); } }); } // Variables declaration - do not modify private java.awt.TextField AGE; private javax.swing.JLabel BIRTH; private javax.swing.JLabel BIRTH1; private javax.swing.JLabel BIRTH2; private javax.swing.JLabel BIRTH3; private java.awt.TextField BRANCH; private java.awt.TextField COUNTRY; private javax.swing.JToggleButton DELETE; private java.awt.TextField EMAIL; private javax.swing.JButton EXIT; private java.awt.TextField ID; private java.awt.Label Label8; private javax.swing.JLabel NAME; private java.awt.TextField PLACE; private javax.swing.JButton RESET; private javax.swing.JToggleButton UPDATE; private javax.swing.JComboBox combo; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2;
  • 44. private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel4; private javax.swing.JLabel jLabel5; private javax.swing.JLabel jLabel6; private javax.swing.JLabel jLabel7; private javax.swing.JLabel jLabel8; private javax.swing.JLabel jLabel9; private java.awt.Label label1; private java.awt.Label label3; private java.awt.Label label4; private java.awt.Label label5; private java.awt.Label label6; private java.awt.Label label7; private java.awt.Label status; private javax.swing.JLabel status1; // End of variables declaration } RESULT
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50. CONCLUSION After we have completed the assignment we are sure that the problems in the existing system would overcome. The “STUDENT APPLICATION FORM” process made computerized to reduce human errors and to increase the efficiency. The main focus of this assignment is to lessen human efforts. The maintenance of the records is made efficient, as all the records are stored in the ACCESS database, through which data can be retrieved easily. The navigation control is provided in all the forms to navigate through the large amount of records. The editing is also made simpler. The user has to just type in the required field and press the submit button to get the desired information. Our main aim of the assignment is to enter the details of the student and to get the correct information about a particular student. The problems, which existed in the earlier system, have been removed to a large extent. And it is expected that this assignment will go a long way in satisfying student’s requirements.