issue with implementation of keyListener for writting unicode (Sindhi) in java

前端 未结 2 877
再見小時候
再見小時候 2021-01-23 09:03

I want to use unicode through the implementation of keyListener on jTextField in this way :

textField.addKeyListener(new KeyListener() {

        @O         


        
2条回答
  •  春和景丽
    2021-01-23 09:22

    Use a DocumentFilter.

    By the time the KeyListener recives the event, the character has already being added to the field.

    Also KeyListener won't deal with the user pasting content into the field

提交回复
热议问题