public Menu(){
Component c = new Component(){};
c.addKeyListener(new KeyListener(){
public void keyPressed(KeyEvent e) {}
public void keyReleased(KeyEvent e) {}
public void keyTyped(KeyEvent e) {
int theCode = e.getKeyCode();
if (theCode==KeyEvent.VK_DOWN)
mIndex++;
}
});
}
I can't find the original code anywhere in my archive of work, so I was wondering if anyone could point me in the right direction.
-Cheers