Cointainer-Rendering Problem, but with the addition.....
| Newsgroups | gmane.comp.embedded.carlsbad-cubes |
|---|---|
| Message-ID | <[email protected]> |
After reading the API again, I've tried the following:
First Example:
.
.
.
SwingEngine swix = new SwingEngine("xml/animation1.xml");
.
.
.
if (Combo Item...............){
center_panel.invalidate();
center_panel.removeALL();
center_panel.add(swix.find("anim1")); /*anim1 is the id from the button
<button id="anim1" icon="....." />*/
center_panel.validate();
}
#################################
Second Example:
.
.
.
SwingEngine swix = new SwingEngine();
.
.
.
if (Combo Item...............){
swix.getIdMap().clear()
center_panel.invalidate();
center_panel.removeALL();
swix.insert("xml/anim1.xml", center_panel);
/*the first tag in the xml file is a "dummy tag", therefore the panel tag
should be insert in my existing panel.
<dummy>
<panel>
<button id="anim1" />
<button id="anim2" />
</panel>
</dummy>*/
center_panel.validate();
}
Both Sample, didn't solve my problem.
After the Combo Choice, all components were removed from the center_panel, but
there aren't new components, that should be there after the add(..),
swix.insert(...).
The find(String id) method returns "null", but the id/Button exists in the xml
File.
What's wrong in the above samples?
Regards
Erik