public static void deserialize() {
        int x;
        try
        {
            FileInputStream fileIn = new FileInputStream("/Users/Ruben/Documents/fool.ser");
            ObjectInputStream in = new ObjectInputStream(fileIn);
            Canvas.components = (ArrayList) in.readObject();

            x = Canvas.components.size();
            in.close();
            fileIn.close();
        }catch(IOException i)
        {
            i.printStackTrace();
            return;
        }catch(ClassNotFoundException c)
        {
            System.out.println("String class not found");
            c.printStackTrace();
            return;
        }
        errorLabel.setText("Deserialized String...");
        panel3.setVisible(false);
        panel2.setVisible(true);
        for (int i=0; i<x; i++) {
            Canvas.components.get(i).setLocation((Canvas.components.get(i).x-100), Canvas.components.get(i).y-100);
            canvas1.add(Canvas.components.get(i));
        }


    }