private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
        BufferedImage image = new BufferedImage(512,512, BufferedImage.TYPE_BYTE_GRAY);
        viewRefresher.refreshView((Graphics2D) image.getGraphics());
        ImageIO.saveImage(image);
    }//GEN-LAST:event_jMenuItem2ActionPerformed