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?