How to Import CSV to Databases In JAVA GUI

Now i will explain how to import your csv to database in JAVA GUI. You must make class java for connect to your database.

1. You must make class java for connect to your database.

makeClassConnect

and this example code for connect to your database.

connectClass

2. Make new Jframe class and put two Jbutton on your jframe.

ImportCsvClass

3. We make filechooser for take your csv file.

eventChooseFile

and  the code for filechooser

filechooser

4. after that, we make import for import csv to database.

eventImport

 

and the code for import csv

codeImport

Continue reading

Advertisements