when i use KeyboardFocusManager them program don磘 work very well

i use

this.addKeyListener(new java.awt.event.KeyAdapter()

{

public void keyPressed(KeyEvent e)

{

this_keyPressed(e);

}

});

when i change for KeyboardFocusManager the program don磘 work very well

KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(

new KeyEventDispatcher() {

public boolean dispatchKeyEvent(KeyEvent e) {

this_keyPressed(e);

// If the key should not be dispatched to the

// focused component, set discardEvent to true

boolean discardEvent = false;

return discardEvent;

}

});

[628 byte] By [lamatiasa] at [2007-11-27 8:46:33]
# 1
> when i change for KeyboardFocusManager the program> don磘 work very wellThat's terrible to hear.Are you looking for sympathy or do you want an answer to a question? If the answer is the latter, please state your question in the form of a question
tjacobs01a at 2007-7-12 20:49:16 > top of Java-index,Desktop,Core GUI APIs...
# 2

when i change jre 1.3 to 1.5 the listener don磘 work

addKeyListener(new java.awt.event.KeyAdapter()

{

public void keyPressed(KeyEvent e)

{

if (e.getKeyCode() == KeyEvent.VK_F12)

{

this_keyPressed(e);

}

}

});

I use KeyboardFocusManager but the executation dont磏 work very well

why?

KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(

new KeyEventDispatcher() {

public boolean dispatchKeyEvent(KeyEvent e) {

this_keyPressed(e);

// If the key should not be dispatched to the

// focused component, set discardEvent to true

boolean discardEvent = false;

return discardEvent;

}

});

lamatiasa at 2007-7-12 20:49:16 > top of Java-index,Desktop,Core GUI APIs...
# 3

In your last posting on this topic you where...

a) asked to use the "code formatting tags" when posting code. You didn't.

b) given a solution using key bindings. You haven't.

Since you didn't listen to the advice last time, I would be wasting my time again by making a suggestion this time.

camickra at 2007-7-12 20:49:16 > top of Java-index,Desktop,Core GUI APIs...
# 4
hello could you post the example of key bindings.thanks
lamatiasa at 2007-7-12 20:49:16 > top of Java-index,Desktop,Core GUI APIs...