I have an AutoCompleteTextField and I want to change its options in runtime. The problem is that I don't know how to show changes.
Here's a very simple example of what I've tried:
public void start() {
if(current != null){
current.show();
return;
}
Form form = new Form( new FlowLayout() );
String [] list2 = { "option A", "option B"};
AutoCompleteTextField textField2 = new AutoCompleteTextField( list2 );
form.add( textField2 );
form.show();
list2 = new String [2];
list2 [0] = "X";
list2 [1] = "D";
textField2 = new AutoCompleteTextField( list2 );
form.show();
}
I always displays "option A" and "option B". I already tried for.repaint(), textField2.repaint()...
Any help will be appreciated.