private void saveMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveMenuItemActionPerformed
        // TODO add your handling code here:
        try {
            fos = new FileOutputStream(file + ".oblm");
            oos = new ObjectOutputStream(fos);
            oos.writeObject(NewProject.oblm);
            oos.close();
            fos = new FileOutputStream(file + ".obam");
            oos = new ObjectOutputStream(fos);
            oos.writeObject(NewProject.obam);
            oos.close();
            fos = new FileOutputStream(file + ".obed");
            oos = new ObjectOutputStream(fos);
            oos.writeObject(NewProject.obed);
            oos.close();
            fos = new FileOutputStream(file + ".obnm");
            oos = new ObjectOutputStream(fos);
            oos.writeObject(NewProject.obnm);
            oos.close();
            fos = new FileOutputStream(file + ".obnmd");
            oos = new ObjectOutputStream(fos);
            oos.writeObject(NewProject.obnmd);
            oos.close();
            fos = new FileOutputStream(file + ".obnpd");
            oos = new ObjectOutputStream(fos);
            oos.writeObject(NewProject.obnpd);
            oos.close();
            fos = new FileOutputStream(file + ".obappm");
            oos = new ObjectOutputStream(fos);
            oos.writeObject(NewProject.obappm);
            oos.close();
            fos = new FileOutputStream(file + ".obtcl");
            oos = new ObjectOutputStream(fos);
            oos.writeObject(NewProject.obtwd);
            oos.close();
            if (NewProject.obpd.isProtocol()) {
                fos = new FileOutputStream(file + ".obprd");
                oos = new ObjectOutputStream(fos);
                oos.writeObject(NewProject.obprd);
                oos.close();
                File file1;
                for (int j = 1; j < fileTabbedPane.getTabCount(); j++) {
                    for (k = 0; k < i; k++) {
                        if (fileTabbedPane.getTitleAt(j).equals(NewProject.obpd.getOpentabsname(k)) && NewProject.obpd.isOpentabs(k)) {
                            try {
                                if (NewProject.obpd.getModifyprotocoltab(k)) {
                                    file1 = new File(file.getParent() + "//" + NewProject.obpd.getProtocolFile().getName() + "//" + NewProject.obpd.getOpentabsname(k));
                                } else {
                                    file1 = new File(NewProject.obprd.getProtocolFile().getParent() + "//" + NewProject.obpd.getOpentabsname(k));
                                }
                                FileOutputStream fop = new FileOutputStream(file1);
                                if (file1.createNewFile()) {
                                    String temp;
                                    temp = tabs[k].getText();
                                    byte bufn[] = new byte[temp.length()];
                                    bufn = temp.getBytes();
                                    fop.write(bufn);
                                    fop.close();
                                } else {
                                    FileOutputStream erasor = new FileOutputStream(file1);
                                    erasor.write((new String()).getBytes());
                                    erasor.close();
                                    String temp;
                                    temp = tabs[k].getText();
                                    byte bufn[] = new byte[temp.length()];
                                    bufn = temp.getBytes();
                                    fop.write(bufn);
                                    fop.close();
                                }
                            } catch (IOException e) {
                                System.out.println(e);
                            }
                            NewProject.obpd.setProtocolFiles(fileTabbedPane.getTitleAt(j), NewProject.obpd.getProtocolFileCounter(), NewProject.obpd.getModifyprotocoltab(k));
                            tabModified[k] = false;
                        }
                    }
                }
            }
            fos = new FileOutputStream(file + ".obpd");
            oos = new ObjectOutputStream(fos);
            oos.writeObject(NewProject.obpd);
            oos.close();
            statusTextArea.append("Project Successfully saved.\n");
            NewProject.obpd.setSaved(true);
        } catch (IOException ie) {
            System.out.println(ie);
        }
    }//GEN-LAST:event_saveMenuItemActionPerformed