Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / September 2006

Tip: Looking for answers? Try searching our database.

Dynamic Control Creation

Thread view: 
andrewm1986@gmail.com - 14 Sep 2006 11:38 GMT
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 - 14 Sep 2006 14:01 GMT
> 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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.