• Post Reply Bookmark Topic Watch Topic
  • New Topic

Combobox rendering problem  RSS feed

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have an application which displayed a list of cities.
Initially we had about 1000 cities and the combo box rendering
worked fine, I could use the scroll bar and scroll down easily
and the combo box painted itself ok.
However the model now has about 6000 cities and the combo box
rendering fails. When I scroll down combo box cant paint itself
correctly.
I think the model is not fast enough to return the visible rows
as I scroll through. I am using a java.util.Vector to store the
items and its a member of a class that extends AbstractListModel
I am attaching the model I am using.
Is there a way I can get around this ??
Please note that I cant use JDK1.2 so using collection is out
of question.
/*-- Here is the model I use for the combobox --*/
public class MyComboBoxModel extends AbstractListModel
implements MutableComboBoxModel, Serializable
{
public Vector objects;
public Object selectedObject;
.....
}
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!