I want to tell me How to save image to the mySQL after the user uploaded.
HINT : using NetBeans GUI Builder
This my code for choose image:
private void btnJFileChooserActionPerformed(java.awt.event.ActionEvent evt) {
JFileChooser fc = new JFileChooser();
int result = fc.showOpenDialog(null);
if (result == JFileChooser.APPROVE_OPTION) {
File file = fc.getSelectedFile();
try {
image2.setIcon(new ImageIcon(ImageIO.read(file)));
} catch (IOException e) {
e.printStackTrace();
}
}
This capture for Setter and Getter:
http://up07.s-oman.net/DVMGa.png
This capture for save button:
http://up07.s-oman.net/P2slSGkcj.png