public void saveInstrument(VInstrument toSave) 
    {
        if (toSave.isBuilt())
        {
            File target;
            JFileChooser fileChosser = new JFileChooser();
            int option = fileChosser.showSaveDialog(VMainWindow.window);
            switch (option)
            {
                case JFileChooser.APPROVE_OPTION:
                    try
                    {
                        target = fileChosser.getSelectedFile();
                        FileOutputStream outputStream = new FileOutputStream(target);
                        ObjectOutputStream outputObject = new ObjectOutputStream(outputStream);
                        outputObject.writeObject(toSave);
                        
                        outputObject.close();
                        outputStream.close();
                    }
                    catch (FileNotFoundException ex)
                    {
                        ex.printStackTrace();
                    }
                    catch (IOException ex)
                    {
                        ex.printStackTrace();
                    }
                    finally
                    {
                    }
                break;
            }
        }
        else
        {
            JOptionPane.showMessageDialog(VMainWindow.window, "The instrument is not properly built");
        }
    }