can i add the combobox into particular cell of the JTable?
Posted
by Venkats
on Stack Overflow
See other posts from Stack Overflow
or by Venkats
Published on 2010-03-30T07:46:50Z
Indexed on
2010/03/30
7:53 UTC
Read the original article
Hit count: 511
I want to add combobox into a cell of JTable.
model=new DefaultTableModel(data,col);
JTableHeader head=new JTableHeader();
head.setBackground(Color.BLUE);
table=new JTable(model);
table.add(head);
JComboBox combo = new JComboBox();
combo.addItem("Names");
combo.addItem("Antony");
combo.addItem("Victor");
combo.addItem("Ramkumar");
table.add(combo);
But i cant get the combobox in the cell. Is it possible to set combo box?
© Stack Overflow or respective owner