-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi!!!
I need to fill a combobox with the result of a SQL query.Does anyone has an idea? is it better to get it from the direct result of the query or from an XML format? Anyone did it?
Tks a lot!
its doesn't matter where your data from, the important is that you have to cast them into an Array
<window id="win" title="test"> <combobox id="cb2" width="300px" /> <zscript><![CDATA[ String[] data = new String[30]; for (int j = 0; j < data.length; ++j) { data = "Data " + j; } ListModel lm = new SimpleListModel(data); cb2.setModel(lm); ]]></zscript> </window>
Asked: 2008-11-10 16:39:35 +0800
Seen: 151 times
Last updated: Nov 11 '08