Hey there! Does anyone know how to put Swing Elements (JLabel) into a Cell of a JTable? The getValueAt(int row, int col) method returns an Object and the JTable displays the result of the toString() method of the element and not the element itself. Thanks i.a. Praiser
posted 13 years ago
Hello. The table model should contain only data. Swing elements could be used to render the cells of the table by extending from them and implementing TableCellRenderer. Here is an example fron the Java Tutorial.