阅读背景:

如何使Java jtables、单元编辑器和撤销一起工作,创建额外的撤销事件?

来源:互联网 

In the following code, I create a jtable with a custom cell editor for the first column and then add undo capabilities to the table. When you run the program, the program allows you to change the values in the first column (test by appending a "d" and then an "e" to the "abc" already there). Now enter control-z (undo) and enter control-z again. It works as expected. But now enter control-z (undo) again. This time the "abc" is erased. It looks like the swing system is setting the initial value of the column and creating an undo event for that action which the user can then undo. My question - how do I write my code so that the user only can undo the actions the user makes?In the following code, I create a jtable with a




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: