i m using LWUIT tool for develop mobile application.but i m unable to clear all elements of List.
you have nay solution for this plz reply me soon
FYI... the source for LWUIT is available at:
There seems to be 2 ways of clearing all elements from the list.
1) get the model, from the model get the size, and then remove the item at an index (size) number of times.
ListModel model = uiList.getModel();
for(int i=model.getSize(); i>=0; --i)
2) replace the model with an empty one.
ListModel model = new YourModel();
Next time try reading the source, it is faster than waiting for someone else to read it for you.
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Participation.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.