更新时间:2023-12-03 14:15:58
您需要的两个的渲染器的和的和编辑,如本的例如的。见的如何使用表:编辑器和渲染器的对的详细信息。四角切圆,你应该覆盖的方法的isCellEditable()
在的TableModel
而不是扩展的JTable
。
You need both a renderer and and editor, as shown in this example. See How to Use Tables: Editors and Renderers for details. Tangentially, you should override the method isCellEditable()
in your TableModel
rather than extending JTable
.