'Java Swing - Save infos of the figures as SVG

try {
            FileInputStream f = new FileInputStream("proj.bin");
            ObjectInputStream o = new ObjectInputStream(f);
            this.FigureList = (ArrayList<Figure>) o.readObject();
            o.close();
        } catch (Exception x) {
        }

this.addWindowListener(
                new WindowAdapter() {
                    public void windowClosing(WindowEvent e) {
                        try {
                            FileOutputStream f = new FileOutputStream("proj.bin");
                            ObjectOutputStream o = new ObjectOutputStream(f);
                            o.writeObject(FigureList);
                            o.flush();
                            o.close();
                        } catch (Exception x) {
                        }
                        System.exit(0);
                    }
                });

I've been using this code to save the infos of my panel(Figure position, color and those kind of things), so whenever I run the code again, there will be things already there. Can save it as SVG and use this svg file in others apps? I've tried to change ".bin" for ".svg" but it seems it's not that easy.

You can see my whole code here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source