multiple image Filechooser
in
Programming Questions
•
9 months ago
Hello!
I'm am looking for a solution how to select two image files with Filechooser so i can use them as image1 and image2?
Hope someone can help me with this issue.
public void setup() {
final JFileChooser fc = new JFileChooser();
int returnVal = fc.showOpenDialog(this);
if (returnVal == JFileChooser.APPROVE_OPTION) {
File file = fc.getSelectedFile();
img1 = loadImage(file.getPath());
// File file2 = fc.getSelectedFile();
// img2 = loadImage(file2.getPath());
I'm am looking for a solution how to select two image files with Filechooser so i can use them as image1 and image2?
Hope someone can help me with this issue.
public void setup() {
final JFileChooser fc = new JFileChooser();
int returnVal = fc.showOpenDialog(this);
if (returnVal == JFileChooser.APPROVE_OPTION) {
File file = fc.getSelectedFile();
img1 = loadImage(file.getPath());
// File file2 = fc.getSelectedFile();
// img2 = loadImage(file2.getPath());
1