LoginSystem.java
1) Paste the mysqlconnector.jar file in jre/lib/ext folder2) Set classpath
1) Paste the mysqlconnector.jar file in jre/lib/ext folder2) Set classpath
| Home | » | Java | » | Advance Java | » | Java Database Connectivity | » | Delete records-GUI |
|---|
This example delete record from the Access table 'SchoolClasses' on the hard disk, using classes of java.sql and java.awt and more packages with Grapchical User Interface.
To build these concepts and skill, a 'SchoolClasses' table will be used as a working model. This table will be created in an Access database i.e. the SchoolDemo.mdb database will hold a 'SchoolClasses' table. The structure of the table will be as described below:
|
The Following block of code creates the UI described using Java Swing Components.
|
|
|
|
|
Diagram 22.34 output of DeleteRecords.class |
|
|
| Diagram 22.35 entering Reg.No into Reg.No JTextBox |
|
|
| Diagram 22.36 Reg.No is Exist |
|
|
| Diagram 22.37 Warring Message "Do You Really Want To Delete The Record ? 603" |
|
|
| Diagram 22.38 Record Deleted Successfully |
| View records from the Access/SQL table. | |
| Inserts records into the Access/SQL table. | |
| Updates records into the Access/SQL table. | |
| Deletes records from the Access/SQL table. | |
| Drops the Access/SQL table. |
| Home | » | Java | » | Advance Java | » | Java Database Connectivity | » | Updates records-GUI |
|---|
This example updates records into the Access table 'SchoolClasses' on the hard disk, using classes of java.sql and java.awt and more packages with Grapchical User Interface.
To build these concepts and skill, a 'SchoolClasses' table will be used as a working model. This table will be created in an Access database i.e. the SchoolDemo.mdb database will hold a 'SchoolClasses' table. The structure of the table will be as described below:
|
The Following block of code creates the UI described using Java Swing Components.
|
|
| The Output of UpdatesRecords table is as shown below: |
| Diagram 22.28 The Update Record Screen for UpdatesRecords.class. |
| Diagram 22.29 Message displayed when wrong Reg.No is entered. |
| Diagram 22.30 Screen Ready for udpate record |
| Diagram 22.31 Screen asking Do you want update this record? |
| Diagram 22.32 Display message Record Successfully Updated |
| Diagram 22.33 Display Screen after successfully updated record |
![]() |
View records from the Access/SQL table. |
![]() |
Inserts records into the Access/SQL table. |
![]() |
Updates records into the Access/SQL table. |
![]() |
Deletes records from the Access/SQL table. |
![]() |
Drops the Access/SQL table. |
| Home | » | Java | » | Advance Java | » | Java Database Connectivity | » | View records-GUI |
|---|
This example shows records from the Access table 'SchoolClasses' on the hard disk, using classes of java.sql and java.awt and more packages with Grapchical User Interface. This program simply use UI component of java swing like JLabel, JButton, JMenu and JTable, after view records from database in java table you can simple print the records using print() method of java.
To build these concepts and skill, a 'SchoolClasses' table will be used as a working model. This table will be created in an Access database i.e. the SchoolDemo.mdb database will hold a 'SchoolClasses' table. The structure of the table will be as described below:
|
The Output of View table is as shown below:
|
|
|
|
| Diagram 22.25 |
|
|
| Diagram 22.26 of ViewRecords.class in JTable |
|
|
| Diagram 22.27 using printer in JTable |
| View records from the Access/SQL table. | |
| Inserts records into the Access/SQL table. | |
| Updates records into the Access/SQL table. | |
| Deletes records from the Access/SQL table. | |
| Drops the Access/SQL table. |