|
@@ -1,5 +1,5 @@
|
|
|
import java.io.*;
|
|
|
-import java.io.file;
|
|
|
+import java.io.File;
|
|
|
import java.util.*;
|
|
|
import java.awt.*;
|
|
|
import javax.swing.*;
|
|
@@ -25,6 +25,7 @@ public class Controls extends JPanel implements Observer
|
|
|
private ImageIcon listIcon;
|
|
|
private ImageIcon folderIcon;
|
|
|
private JButton fileButton;
|
|
|
+ private JFileChooser fileChooser;
|
|
|
|
|
|
// Bob the Builder this shit
|
|
|
public Controls(Model model)
|
|
@@ -95,7 +96,7 @@ public class Controls extends JPanel implements Observer
|
|
|
|
|
|
if (retval == JFileChooser.APPROVE_OPTION)
|
|
|
{
|
|
|
- File file = jfc.getSelectedFile();
|
|
|
+ File file = fileChooser.getSelectedFile();
|
|
|
if (file.isFile())
|
|
|
{
|
|
|
model.newPic(file.getAbsolutePath(), file.getName(), file.length(), file.lastModified());
|