Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   Dynamic Control Creation (http://www.velocityreviews.com/forums/t370585-dynamic-control-creation.html)

andrewm1986@gmail.com 09-14-2006 10:38 AM

Dynamic Control Creation
 
Hey all.

When a user clicks on something I want to add a new control to a panel
in my frame with an XYLayout.

This is the code I have.

GUI.Components.Component c = null; //My packages
....
c = new SomeComponentICreated();

pnlMain.add("10,10,50,20",c);
System.out.println(c.isVisible());
System.out.println(pnlMain.getComponentCount());

Output is

true
1
true
2

If I do it twice, but I cannot see my controls!

Andrew


Andrew Thompson 09-14-2006 01:01 PM

Re: Dynamic Control Creation
 
andrewm1986@gmail.com wrote:
> Hey all.


Well hey again!

Please refrain from multi-posting in future.

(X-Post to c.l.j.g/p/h, w/ f-u to c.l.j.help only)

Andrew T.



All times are GMT. The time now is 08:45 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.