Is it possible to detect a button clicked inside a table cell?

前端 未结 2 643
太阳男子
太阳男子 2020-12-21 18:56

I a swing application in which i have a table inside it i\'m putting a panel that can contain a button.The code is follow

 public class MyCellDataRenderer im         


        
2条回答
  •  不思量自难忘°
    2020-12-21 19:27

    In my cell, I have two buttons and three labels; they are all in one panel.

    You are correct to use a TableCellRenderer and TableCellEditor. In this complete example, the StatusEditor queries the enclosing StatusPanel and returns a suitable value in its implementation of getCellEditorValue().

提交回复
热议问题