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
Yes it is possible and there are few ways how to do it based on your application design. As I do not know the details I would suggest this simple solution:
table.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
final int row = table.rowAtPoint(e.getPoint());
final int column = table.columnAtPoint(e.getPoint());
if(isButtonCell(row, column)) { //check if the cell is your button
handleButtonClicked(); //invoke the click button handle
}
}
});