public GridFrame(){
        frame.setDefaultCloseOperation(frame.EXIT_ON_CLOSE);
        frame.setLayout(new BorderLayout());
        
        JButton exp = new JButton("Export");
        exp.setFocusable(false);
        exp.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                final JFileChooser fc = new JFileChooser();
                fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
                int returnVal = fc.showOpenDialog(frame);
                if(returnVal == JFileChooser.APPROVE_OPTION){
                    System.out.println(fc.getSelectedFile());
                    String dir = fc.getSelectedFile().toString();
                    String fileName = JOptionPane.showInputDialog(frame,"File name pls");                    
                    System.out.println(dir);
                    IO io = new IO(dir + "/" + fileName);
                    try {
                        io.drawImg(gp.layers);
                    } catch (IOException ex) {
                        Logger.getLogger(GridFrame.class.getName()).log(Level.SEVERE, null, ex);
                    }
                    
                    
                }
            }
            
        });
        
        frame.add(exp, BorderLayout.NORTH);
        frame.add(gp = new GridPanel(100,100),BorderLayout.CENTER);
        
        lp = new LayerPanel();
        frame.add(lp,BorderLayout.SOUTH);
        
        frame.pack();
        frame.setVisible(true);  
        
        
    }