Jpanel with button in JTable?
Publicado por jose (17 intervenciones) el 01/11/2015 22:50:46
Hello everyone wanted to know how I can display data from a database on a panel with buttons inside a cell of a jTable, but I want the buttons to change text as the query as it could give.
and tried to cellrender and cell editor but I managed to get the changed text buttons for each Row
with this I generate text and image bearing but do not know how to make the text on the buttons actuaice.
and tried to cellrender and cell editor but I managed to get the changed text buttons for each Row
with this I generate text and image bearing but do not know how to make the text on the buttons actuaice.
1
2
3
4
5
6
7
8
9
Object[]imagen = new Object[4];
imagen[0]=new JLabel(""+id);
imagen[1]=new JLabel(jTextField2.getText());
imagen[2]= new JLabel(image);
imagen[3]=new JPanel(null);
modelo.addRow(imagen);
tabla1.setModel(modelo);
tabla1.setEnabled(true);
Valora esta pregunta


0