<Swing Dev> Unexpected NullPointerException by endComposition()
Charles Lee
littlee at linux.vnet.ibm.com
Thu Sep 22 01:12:05 UTC 2011
On 09/21/2011 10:47 PM, Pavel Porvatov wrote:
> Hi Charles,
>> 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.
>>
> Could you please send webrev of your fix? Why did you write "consume
> the left click" but used "mEvent.getButton() == MouseEvent.BUTTON3"?
> Can you explain why should we consume left clicks but not right ones
> (or vice versa)?
>
> Thanks, Pavel
>
Sorry, it should be *RIGHT* click. I will try to make a webrev.
--
Yours Charles
More information about the swing-dev
mailing list