public JPanelRender(JFrame window, final EventosDoTeclado evt, EventosDoRender imgevt){
        
        this.window = window;
        this.imgEvt = imgevt;
        this.evt = evt;
        
        window.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent e) {
                int key = e.getKeyCode();

            if (key == KeyEvent.VK_LEFT || key == KeyEvent.VK_A) {
                evt.teclaEsquerda();
            } else if (key == KeyEvent.VK_RIGHT || key == KeyEvent.VK_D) {
                evt.teclaDireita();
            } else if (key == KeyEvent.VK_UP || key == KeyEvent.VK_W) {
                evt.teclaCima();
            } else if (key == KeyEvent.VK_DOWN || key == KeyEvent.VK_S) {
                evt.teclaBaixo();
            } else if (key == KeyEvent.VK_SPACE) {
                evt.teclaEspaco();
            } else {
                evt.teclaPress(key);
            }
            }
        });
        
    }