<Swing Dev> Unexpected NullPointerException by endComposition()

Charles Lee littlee at linux.vnet.ibm.com
Tue Sep 20 07:58:10 UTC 2011


Hi guys,

This issue is related about sunbug 6938583. 
(http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6938583)

I am thinking maybe it can be fixed in the CodePointIM code. The problem 
is occurred when the IM is in the compose mode and use left click the 
Mouse. Maybe we can consume the left click the event when it is in the 
compose mode?

The code looks like:

if (!notInCompositionMode && (event instanceof MouseEvent)) {
     MouseEvent mEvent = (MouseEvent)event;
     if (mEvent.getID() == MouseEvent.MOUSE_CLICKED && 
mEvent.getButton() == MouseEvent.BUTTON3) {
         mEvent.consume();
     }
     return;
}

in the dispatchEvent of CodePointInputMethod.

-- 
Yours Charles




More information about the swing-dev mailing list