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]

# 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;
}
});
# 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.