开发者

Poor performance when holding down accelerator key for Undo

I have bound a menu item to invoke the undo method of an undomanager on a jtextpane, and assigned an "accelerator" key combination to that undo invoke of开发者_如何转开发 the standard Ctrl-Z. The undo behaves just as I would like it to, unless I hold down Ctrl-Z. When I do that, the undo's are performed at an unpredictable cadence, often freezing for 5 seconds, then doing a batch of undos all at once. I do not know why this is happening, becuase if I rapidly press Ctrl-Z there seems to be no limit to how fast it will go, implying there is no intrinsic performance issue with the undo method.


Could it be that you're mistaking the key repeat delay for the "freezing"?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜