Java programming create runtime panels, objects and variable

For Java programmers using the WireFusion Java object.

Java programming create runtime panels, objects and variable

Postby Ste_corderosa » Sat Sep 10, 2011 12:20 pm

Hi to everybody!
I need a little help, I want to create a panel and populate it with several small images (textures images) and, maybe, buttons, directly from my java Object writing java code. I take the images paths from a DB.I don't know hot to create new objects or widgets that can contain my small texture icons in the panel.

So, the only problem is that i'm not able to add widgets and small images into the panel directly from the java Object, and put its into the panel.
(in runtime mode, because the number of images and buttons will depend of how much texture i will download from a DB for the 3d object).
I need a Java code example to know how create objects, image objects and insert buttons into a panel.

For example, i want to put [5] images and [5] buttons into the panelObject.
How can i do that??

I just need something like this, but wirefusion aceptable:):

Panel panelContents = new Panel();
Image img1= new Image();
Image img2= new Image();
.....
.....
Image img5= new Image();

Button bt1= new Button();
Button bt2= new Button();
.....
.....
Button bt5= new Button();

img1.source="my_img1_source.jpg";
img2.source="my_img2_source.jpg";
.....
.....
img5.source="my_img2_source.jpg";

panelContents.addChild(img1);
panelContents.addChild(img2);
......
......
panelContents.addChild(img5);

panelContents.Show();

somebody can help me?? thanks guys!!!!!!
Ste_corderosa
 
Posts: 1
Joined: Sat Sep 10, 2011 11:56 am

Return to Java in WireFusion

Who is online

Users browsing this forum: No registered users and 0 guests

cron