这是我的初始代码。单击按钮时,必须将照片直接上传到数据库..
private void browseActionPerformed(java.awt.event.ActionEvent evt) {
JFileChooser chose=new JFileChooser();
chose.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
chose.setMultiSelectionEnabled(true);
int r=chose.showOpenDialog(new JFrame());
if(r == chose.APPROVE_OPTION){
String filepath= chose.getSelectedFile().getAbsolutePath();
fp = filepath;
path.setText(filepath);
}// TODO add your handling code here:
}