I have a class that extends AbstractTableModel and I'd like to insert a JPanel with clickable text (think hyperlink) into one of the cells. Is this possible? Currently the output in my cell with JPanel looks like "javax.swing.JPanel[,0,0,0x0,invalid,layout=java.awt.FlowLayout,ali..." I've used the same type of JLabel elsewhere in my application to open up new tabs and would like to have the same type of action in my table.
public Object getValueAt(int row, int column) {
if (row >= getRowCount()) return "???";
switch (column) {
case 1:
return "???"
case 2:
return myJPanel;
case 3:
return "?" ;
case 4:
return new Integer(2);
default:
return "???" ;
}
}