简体   繁体   English

使用JButton作为单元格编辑器的JTable

[英]JTable with JButton as cell editor

I used a JButton as render and editor in JTable, with following problems: 我在JTable中使用JButton作为呈现器和编辑器,但存在以下问题:

  1. The JTable row is not selected when JButton clicked. 单击JButton时未选择JTable行。
  2. When the JButton is clicked, how to get its location within JTable, in other words its columnIndex and rowIndex 单击JButton时,如何获取其在JTable中的位置,换句话说,其columnIndex和rowIndex

Any help will be appreciated! 任何帮助将不胜感激!

有关一种可能的解决方案,请参见表按钮列

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

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