I have created List using LWUIT.
but is shows me item with index.
like
I want to remove left side index 1,2,3 how can I do that?
Code:
class mainForm extends Form implements ActionListener{
List list;
String newkey = "";
final String COMPANY[] = {"AIRCEL", "AIRTEL", "BPL", "BSNL", "IDEA", "RELIANCE", "TATA DOCOMO", "TATA INDICOM", "UNINOR", "VIRGIN", "VIDEOCON", "VODAFONE", "AIRCEL1", "AIRTEL2", "BPL1", "BSNL1", "IDEA1", "RELIANCE1", "TATA DOCOMO1", "TATA INDICOM1", "UNINOR1", "VIRGIN1", "VIDEOCON1"};
final int CO_LENGTH = COMPANY.length;
mainForm() {
super("Main Form");
setLayout(new BoxLayout(BoxLayout.Y_AXIS));
list = new List(COMPANY);
list.addActionListener(this);
list.setPreferredW(getWidth());
addComponent(list);
}
}
Thank you.
Try:
list.setListCellRenderer(new DefaultListCellRenderer(false));
The javadocs explains the reason for false "showLineNumbers"