@Override
    public void start(final Stage primaryStage) throws JAXBException {
        primaryStage.setTitle("een");
        
        opslag = new ObjectenOpslag(root, null);
        
        
        label = new Label("Welkom!!!!");
        root.getChildren().add(label);
        
        
        rz = new Rugzak();
        root.getChildren().add(rz);
        
        ab = new ActionBenodigdheden(label, opslag, rz);
        
        Button save = new Button();
        save.setOnAction(new EventHandler<ActionEvent>() {

            @Override
            public void handle(ActionEvent event) {
                System.out.println("----");
                 FileChooser fileChooser = new FileChooser();

              
              //Show save file dialog
              File file = fileChooser.showSaveDialog(primaryStage);
              
              if(file != null){
                opslag.save(file);
              }
                System.out.println("----");
            }
        });
        save.setText("Save");
        save.setTranslateX(400);
        save.setTranslateY(20);
        root.getChildren().add(save);
        
        me = new Me(5.0, 10.0);
        root.getChildren().add(me.getShape());
        
        root.getStylesheets().add("Opmaak/opmaak.css");
        
        primaryStage.setScene(new Scene(root));
        // waarom???? :(
        //primaryStage.getScene()
                rz.getTabel().setOnKeyPressed(new EventHandler<KeyEvent>(){

            @Override
            public void handle(KeyEvent t) {
                
                
                if(dX.get(t.getCode()) != null){
                    double nx = me.getX() + dX.get(t.getCode());
                    double ny = me.getY() + dY.get(t.getCode());
                    
                    if (!opslag.hitBuilding(nx, ny)){
                        me.verplaats(nx, ny);
                    }
                    label.setText(null);
                    
                    
                }else if(t.getCode() == KeyCode.SPACE){
                    Spatiebaar b = opslag.onSpatiebaarDing(me.getX(),me.getY());
                    
                    if(b != null && b.hasAction()){
                        b.doAction(ab);
                    }
                    
                    
                }
                
                
            }
            
        });
        
        
        primaryStage.setWidth(800);
        primaryStage.setHeight(600);
        primaryStage.show();
    }