When i press enter in text pane Document Listener call first instead key listener

89 Views Asked by At

Iam doing some example on event listener in java. I add two listener on JTextPane key Listener and Document Listener. When I insert into the text pane always KeyListener call first then DocumentListener but when press "enter" key it call DocumentListener and then call KeyListener.

Actually I am not understand why this happen when I only press "Enter" key?

0

There are 0 best solutions below