Issue
I am doing a project for vehicle repair center. In this project I need to upload photos of the damaged vehicle so employees can watch them later.
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);
I tried above, but I can choose only one photo at one time, like this:
I need these kind of thin
ddddd
Solution
i don't do java but a quick glance at the manual suggests you need to enable selection of multiple files:
setMultiSelectionEnabled
public void setMultiSelectionEnabled(boolean b)
Sets the file chooser to allow multiple file selections.
Parameters:
b - true if multiple files may be selected
See Also:
isMultiSelectionEnabled()
Answered By - just somebody
Answer Checked By - Gilberto Lyons (JavaFixing Admin)