Event listeners not working properly

On my home computer everything works fine, but on my laptop i downloaded the new jdk version 6 and for some reason or another, none of the recent event listeners work (ie. MouseListener, KeyListener), and there are also some other classes and interfaces that don't work. However, i did some testing and the deprecated methods (public boolean keyPressed() ) work for some reason. Does any1 have any idea why this would be?

[429 byte] By [Young_Marine_Cpla] at [2007-11-26 13:27:44]
# 1
Can you show us some code that demonstates this problem?
CaptainMorgan08a at 2007-7-7 20:29:27 > top of Java-index,Security,Event Handling...
# 2

ok the new api

public class thisGameOfMine implements Runnable, KeyListener

// Runnable works, but not the KeyListener - it gets a compiling error

{

// rest of code....

public void keyPressed(KeyEvent e)

{

// this method won't compile

}

}

however, the old API works

public class thisGameOfMine implements Runnable

{

//rest of code.....

public boolean keyDown(Event e, int key)

{

this compiles just fun, but it doesn't run properly

}

}

if these examples aren't sufficient, just let me know, thanks

Young_Marine_Cpla at 2007-7-7 20:29:27 > top of Java-index,Security,Event Handling...
# 3
What is the error?
CaptainMorgan08a at 2007-7-7 20:29:27 > top of Java-index,Security,Event Handling...