Mac OS X 10.6 Update 2 (1.6.0_20) Java 中 JFormattedTextField 删除错误的解决方法
显然,Mac OS X 的最新 Java 更新中引入了一个错误,导致 JFormattedTextFields 中的删除操作执行两次。 请参阅http://lists.apple.com/archives/java -dev/2010/May/msg00092.html
当按下删除键时,DefaultEditorKit.deletePrevCharAction 会被调用两次。
有解决方法的建议吗?
我正在考虑用修补版本替换文本字段的删除操作,以某种方式过滤掉这些重复的调用。
There is apparently a bug introduced in the latest Java update for Mac OS X, which causes deletes in JFormattedTextFields to be performed twice.
See http://lists.apple.com/archives/java-dev/2010/May/msg00092.html
The DefaultEditorKit.deletePrevCharAction is invoked twice when the delete key is pressed.
Are there any suggestions for a workaround?
I'm thinking of replacing the delete action for my text fields with a patched version that somehow filters out these duplicate invocations.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我的解决方法似乎效果很好:
到目前为止我发现的唯一缺点是每毫秒不能删除多个字符。
My workaround, that seems to be working quite well:
The only downside that I have found so far is that you cannot delete more than one character per millisecond.