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 |
After running ViewRecords.class file you will see above screen just simply click on 'View Records' Button this will show the next screen as shown in diagram 22.27 in JTable.
|
Diagram 22.26 of ViewRecords.class in JTable |
You can use print command too in java using print() method as shown in below diagram 22.28.
|
Diagram 22.27 using printer in JTable |
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