private void newFile(){
        
        if(PSTricksGraphEditor.graph.getNodes().isEmpty()){
            return;
        }
        
        int reponse = getResponse();
        
        if(reponse == JOptionPane.YES_OPTION){
            saveFile();
            PSTricksGraphEditor.graph = new Graph();
            Graph.nodeCounter = 0;
            PSTricksGraphEditor.canvas.validate();
            PSTricksGraphEditor.canvas.selected = null;
            PSTricksGraphEditor.canvas.repaint();
        } else if (reponse == JOptionPane.CANCEL_OPTION){
            return;
        } else {
            PSTricksGraphEditor.graph = new Graph();
            Graph.nodeCounter = 0;
            PSTricksGraphEditor.canvas.validate();
            PSTricksGraphEditor.canvas.selected = null;
            PSTricksGraphEditor.canvas.repaint();
        }
    }