public void keyPressed(KeyEvent e) {

                switch(e.getExtendedKeyCode()) {
                    case KeyEvent.VK_LEFT:
                        //System.out.println("lewo");
                        action = "right";
                        Pang.game.ihLudzik.currentFrame=4;
                        if (x_ > 0) v_x_ =-speed_; break;
                    case KeyEvent.VK_UP:
                        //System.out.println("gora");
                        if (y_ > 0) /*v_y_ =-speed_;*/ break;
                    case KeyEvent.VK_RIGHT:
                        //System.out.println("prawo");
                        action = "right";
                        Pang.game.ihLudzik.currentFrame=4;
                        if (x_ <  Config.DEF_WIDTH-Size.valueOf(size_)*res) v_x_ =speed_; break;
                    case KeyEvent.VK_DOWN:
                        //System.out.println("dol");
                        if (y_ <  Config.DEF_HEIGHT) /*v_y_ =speed_;*/ break;
                    case KeyEvent.VK_SPACE:
                        //System.out.println("strzal");
                        shoot(); break;
                }
            }