@Override
    public void keyPressed(KeyEvent ke) {
        if(ke.getKeyCode() == KeyEvent.VK_ENTER){
            if(routeNr.getText()!=null){
                routeNrS = routeNr.getText();
            if(destination!=null){
                destinationS = destination.getText();
            }
            if(routeNrS == null || routeNrS.equals("")){
                System.out.println("feilmelding ang rute nr");
            }
            else if(destinationS == null || destinationS.equals("")){
                System.out.println("feilmelding ang destinasjon");
            }else{
                registertrolley.trolleyApp.xmlp.getFlightRoutes().add(new FlightRoute(99, routeNrS,destinationS));
                registertrolley.trolleyApp.revalidate();
                registertrolley.trolleyApp.repaint();
            }
        }
    }
    }