When i use KeyboardFocusManager them program don�t 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�t 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;
     });

when i change jre 1.3 to 1.5 the listener don�t 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�n 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;
     });

Similar Messages

Maybe you are looking for

  • MS Word Web Service Interface: bad format of date and currency fields

    Hi, I am using MS Word Web Service interface to create contract documents. However, my date and currency fields show in a strange format. Date is in"YYYY-MM-DD" format, while currencies always have "." as decimal separator (probably technical values)

  • Issue with Session variables

    Hi SDNers, I have a few portal components on the portal page that save data directly to the http session as well as some data is stored in the bean and the bean is stored in the component's session. When the user logs in and views the portal page, th

  • Open links in new tab rather than new window

    IS there a way to force Safari to open all links that would normally open in a new window open in a new tab instead? I know I can hold the apple key and click the link to have it go to a new tab but I was just wondering if there was a way to make it

  • Foreign language input on "Solaris 10"

    Hello. I installed "Solaris 10" via 5 CD's (minus the 6th, Languages CD). My question is in what way can the GNOME desktop present an indicator of a language other than English?Via Preferences>Keyboard Layout I added Serbian, German and Bulgarian (it

  • Release code - Purchase requisition - Release Procedure

    Hello, In the purchase requisition release procedure with classification, we are defining release codes say K, P etc. My doubt is , Is this being defined else where based upon the designatin of the person in the organisation, or else, we are defining