Skip to main content

Posts

Showing posts from July, 2016

how to create a file chooser in java to open a file

 JFileChooser s;//creating object of JFileChoseor         s = new JFileChooser();        s.showOpenDialog(null);//opening dialog box        File F=s.getSelectedFile();//storing file to variable f        D.fp=F.getAbsolutePath();//storing file path to variable fp        path.setText(D.fp);//displaying path to textfield path

import data from database to a excel sheet

here now iam going to teach you how to import data to excel from database using java the code is the out put will be like

update query in mysql

update tablename set fieldname=value where condition for example if i have a table h with field m to update the query will be update h set m='newvalue'(if its integer no single quates doesn't needed)