Dynamic Control Creation

Discussion in 'Java' started by andrewm1986@gmail.com, Sep 14, 2006.

  1. Guest

    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
    , Sep 14, 2006
    #1
    1. Advertising

  2. 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.
    Andrew Thompson, Sep 14, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jeff Voigt

    Dynamic Control Creation w/Events?

    Jeff Voigt, Jul 8, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    365
    Natty Gur
    Jul 8, 2003
  2. PABruceFan
    Replies:
    3
    Views:
    4,123
    John Saunders
    Jul 31, 2004
  3. =?Utf-8?B?UGF1bA==?=

    Dynamic control creation design issue

    =?Utf-8?B?UGF1bA==?=, Feb 21, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    424
    =?Utf-8?B?UGF1bA==?=
    Feb 21, 2006
  4. Hugo Flores
    Replies:
    1
    Views:
    496
    daniel #
    Sep 6, 2006
  5. Replies:
    0
    Views:
    331
Loading...

Share This Page