I have a custom cell renderer in JTable, and it works, but instead, "x" appears on the buttons that are the cells in the table, I see "..." (three dots). What did I miss?
/***************************************************************************
* Listener reagujący na dodanie nowej wartości
**************************************************************************/
private static class ButtonRenderer extends JButton implements
TableCellRenderer {
/***********************************************************************
* Konstruktor
**********************************************************************/
public ButtonRenderer() {
super("x");
}
/***********************************************************************
* @see TableCellRenderer#getTableCellRendererComponent(JTable, Object,
* boolean, boolean, int, int)
**********************************************************************/
public Component getTableCellRendererComponent(JTable table,
Object value, boolean isSelected, boolean hasFocus, int row,
int column) {
return this;
}
}
source
share