i dont know where did you do themistake but these works
look at the code i hope it will help:
import java.awt.*;
import java.awt.event.*;
public class MyFrame extends Frame
{
TextField a=new TextField();
TextField b=new TextField();
public MyFrame()
{
a.setBounds(50,50,100,30);
b.setBounds(50,100,100,30);
add(a);
add(b);
setSize(405,305);
setLayout(null);
addWindowListener(new WindowA());
a.addKeyListener(new KeyA());
}
public void setVisible(boolean b)
{
if(b)
{
setLocation(50, 50);
}
super.setVisible(b);
}
static public void main(String args[])
{
try
{
(new MyFrame()).setVisible(true);
}catch (Throwable t){}
}
class WindowA extends WindowAdapter
{
public void windowClosing(WindowEvent event)
{
System.exit(0);
}
}
class KeyA extends KeyAdapter
{
public void keyPressed(KeyEvent event)
{
if(event.getKeyCode()==event.VK_DOWN)
b.requestFocus();
}
}
}