简体   繁体   English

JTable禁用悬停选中的行

[英]Jtable disable hover selected row

i have a little problem with jtable : 我对jtable有一点问题:

在此处输入图片说明

when i click on the Appliquer utton, he clera all the table except the in-write cell, so i need to unset in-write mode?? 当我单击“ 贴花”按钮时,他清除了除写入单元格以外的所有表格,因此我需要取消设置写入模式?

that how it look like when i have clicked Appliquer button : 我单击“ 贴花”按钮时的外观: 在此处输入图片说明

You are still editing the data in the cell so it has not bee saved to the TableModel yet. 您仍在编辑单元格中的数据,因此尚未将其保存到TableModel中。

See Table Stop Editing for a couple of solutions that will make sure the data is saved when you click a button. 请参阅表格停止编辑以获取一些解决方案,这些解决方案可确保单击按钮时保存数据。

Try to use: 尝试使用:

table.clearSelection();

Or for a particular cell use. 或用于特定的小区。

columnModel.getSelectionModel().clearSelection();

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM