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.
The Output of DeleteRecords table is as shown below:
|
|
Diagram 22.34 output of DeleteRecords.class |
|
Diagram 22.35 entering Reg.No into Reg.No JTextBox |
If Reg.No 603 is Exist then it will shown below diagram 22.28. You can use Keyboard short cut to search records like 'Alt + S'. Same for Delete Record 'Alt + D'.
|
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 |
JDBC - Working With User Interfaces - Using Swing Compoents
JDBC - Programming:
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. |
No comments:
Post a Comment