【发布时间】:2017-05-14 19:20:13
【问题描述】:
我正在为汽车维修中心做一个项目。在这个项目中,我需要上传损坏车辆的照片,以便员工稍后观看。
JFileChooser chooser = new JFileChooser();
chooser.showOpenDialog(null);
File f = chooser.getSelectedFile();
String filePath = f.getAbsolutePath();
path.setText(filePath);
File imgFile = new File(filePath);
try {
FileInputStream fin = new FileInputStream(imgFile);
我在上面试过了,但我一次只能选择一张照片,像这样:
我需要这种薄款
dddd
【问题讨论】:
-
你要一次选择多张图片吗
-
是的并将它们添加到mysql数据库
标签: java mysql user-interface netbeans