title: VK_DOWN & VK_UP not working
body: <p>I am trying to make a JAVA program that when you open it, a circle pops up and you can move it. Heres my code so far.</p>
  
  <pre><code>import java.awt.Graphics;
  import java.awt.Graphics2D;
  import java.awt.event.ActionEvent;
  import java.awt.event.ActionListener;
  import java.awt.event.KeyEvent;
  import java.awt.event.KeyListener;
  import java.awt.geom.Ellipse2D;
  import java.security.Key;
  
  import javax.swing.JPanel;
  import javax.swing.Timer;
  
  
  public class WalkerCC extends JPanel implements ActionListener,     KeyListener{
  
  Timer t = new Timer(5, this);
  double x = 0, y = 0, velx = 0, vely = 0;
  
  public WalkerCC() {
      t.start();
      addKeyListener(this);
      setFocusable(true);
      setFocusTraversalKeysEnabled(false);
  
  }
  
  public void paintComponent(Graphics g) {
      super.paintComponent(g);
      Graphics2D g2 = (Graphics2D) g;
      g2.fill(new Ellipse2D.Double(x, 7, 40, 40));
  }
  
  public void actionPerformed(ActionEvent e) {
      repaint();
      x += velx;
      y += vely;
  }
  
  public void up() {
      vely = -1.5;
      velx = 0;
  }
  
  public void down() {
      vely = 1.5;
      velx = 0;
  }
  
  public void left() {
      velx = -1.5;
      vely = 0;
  
  }
  
  public void right() {
          velx = 1.5;
          vely = 0;
  }
  
  public void keyPressed(KeyEvent e) {
      int code = e.getKeyCode();
      if (code == KeyEvent.VK_UP) {
          up();
      }
  
      if (code == KeyEvent.VK_DOWN) {
          down();
      }
  
      if (code == KeyEvent.VK_RIGHT) {
          right();
      }
  
      if (code == KeyEvent.VK_LEFT) {
          left();
      }
  
  }
  public void keyTyped(KeyEvent e) {}
  
  
  public void keyReleased(KeyEvent e) {}
  
  }
  </code></pre>
  
  <p>The problem is, if I open the application and click the left arrow, it goes left, and same for right. But once I do the up and down it stops moving and doesent work!</p>