t.put("Line1", "" + entry.get("seasonName"));
t.put("Line1", (String)entry.get("seasonName"));
I suggest you use a debugger and check your code since you are overriding your model somewhere. This is a simple hello world hand coded application:
package com.mycompany.myapp;
import com.codename1.ui.Display;
import com.codename1.ui.Form;
import com.codename1.ui.Label;
import com.codename1.ui.layouts.BorderLayout;
import com.codename1.ui.list.DefaultListModel;
import com.codename1.ui.list.MultiList;
import com.codename1.ui.plaf.UIManager;
import com.codename1.ui.util.Resources;
import java.io.IOException;
import java.util.Hashtable;
import java.util.Vector;
public class MyApplication {
private Form current;
public void init(Object context) {
try{
Resources theme = Resources.openLayered("/theme");
UIManager.getInstance().setThemeProps(theme.getTheme(theme.getThemeResourceNames()[0]));
}catch(IOException e){
e.printStackTrace();
}
}
public void start() {
if(current != null){
current.show();
return;
}
Form hi = new Form("Hi World");
hi.setLayout(new BorderLayout());
MultiList ml = new MultiList();
Vector<Hashtable> vec = new Vector<Hashtable>();
for(int iter = 0 ; iter < 10 ; iter++) {
Hashtable a = new Hashtable();
a.put("Line1", "XXXX");
vec.add(a);
}
ml.setModel(new DefaultListModel(vec));
hi.addComponent(BorderLayout.CENTER, ml);
hi.show();
}
public void stop() {
current = Display.getInstance().getCurrent();
}
public void destroy() {
}
}
--
You received this message because you are subscribed to a topic in the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/codenameone-discussions/_jP7jWInXl4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to codenameone-discu...@googlegroups.com.
Visit this group at http://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/9c2edf55-3d4c-4606-b112-beaf358444a6%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.