@Override
    public void actionPerformed(ActionEvent e) {
        JFileChooser fileChooser = new JFileChooser();
        int returnVal = fileChooser.showOpenDialog(tulip.Tulip.mainFrame);
        
        if (returnVal == JFileChooser.APPROVE_OPTION) {
            File file = fileChooser.getSelectedFile();
            try (ObjectInputStream oin = new ObjectInputStream(new FileInputStream(file))) {
                tulip.Tulip.mainFrame.setTabName(file.getName());
                tulip.Tulip.mainFrame.getGrapPanel().addUnits((ArrayList<AbstractUnit>) oin.readObject());
                System.out.println(file.getName());
            } catch (IOException ex) {
                Logger.getLogger(SaveFileAction.class.getName()).log(Level.SEVERE, null, ex);
            } catch (ClassNotFoundException ex) {
                Logger.getLogger(LoadFileAction.class.getName()).log(Level.SEVERE, null, ex);
            }
        } 
        
    }