I want to add a combo Box in table cell to provide drag n drop option LWUIT.
I have used this option for it ..
private String strCmbBox[] = { "1", "2", "3", "4" };
ComboBox comboRdoBox = new ComboBox(strCmbBox);
comboRdoBox.setListCellRenderer(new comboBoxRenderer());
TableModel model = new DefaultTableModel(new String[] { "Col 1",
"Col 2", "Col 3" }, new Object[][] {
{"Row 1",new DefaultTableModel(new String[] { "1" },
new Object[][] { { comboRdoBox }, { "lbl" } }),
"Row X" }, { "Row 2", "Row B", "Row Y" },
{ "Row 3", "Row C", "Row Z" },
{ "Row 4", "Row D", "Row K" }, });
Table table = new Table(model);
table.initComponent();
f.addComponent(table);
f.show();
but it returns as a address n all attributes value in cell ; rather displaying combo Box in cell...
Ans : com.sun.lwuit.table.DefaultTableModel@f828ed68
Can any one help me to solve this ... ???
I got it .. after some googling ... :D
In response to your message to my old question, extend Table like in the example I provide.
Override the createCell method to return the combox for the column containing it.