Applet panel changing slow

Discussion in 'Java' started by Iceman, Jan 13, 2004.

  1. Iceman

    Iceman Guest

    I created a panel (p1) with null layout and another panel (p2) in it,
    with null layout too. If I deleted all of the controls in p2 and p2
    itself, then it would seem it confused the applet viewver. The problem
    occurs when I add controls to p2 again. It simply waits too long
    before occuring. This happens only with the Sun's version of the
    applet viewver, not Microsofts, which is quite odd.

    I will add the code if necessary, but outline would be:
    Panel p1 = new Panel();
    p1.setLayout(null);
    p1.setBounds(0, 0, 200, 200);
    Panel p2 = new Panel();
    p2.setLayout(null);
    p2.setBounds(0, 0, 100, 100);
    p2.add(new Button());
    p1.add(p2);

    p1.removeAll();
    p1.add(p2); // This step takes too long...

    This doesn't happen if you don't use null layout and setBounds, or it
    doesn't happen always. Is there any obvious thing I am missing here?

    I am working with MS Visual J++ 6.0 (technology preview 2) and Eclipse
    2.1.

    Anyone who helps - thanks a lot!!!
     
    Iceman, Jan 13, 2004
    #1
    1. Advertising

  2. Iceman

    Mickey Segal Guest

    "Iceman" <> wrote in message
    news:...
    > I created a panel (p1) with null layout and another panel (p2) in it,
    > with null layout too. If I deleted all of the controls in p2 and p2
    > itself, then it would seem it confused the applet viewver. The problem
    > occurs when I add controls to p2 again. It simply waits too long
    > before occuring. This happens only with the Sun's version of the
    > applet viewver, not Microsofts, which is quite odd.


    This sounds the same as the problem shown at:
    http://segal.org/java/ReDisplay/
    I reported this to Sun as a bug but it seems Sun takes months to decide
    whether to classify a report as a bug.
     
    Mickey Segal, Jan 13, 2004
    #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. Harry
    Replies:
    3
    Views:
    569
    Harry Singh
    Nov 10, 2003
  2. HS1
    Replies:
    3
    Views:
    519
  3. HS1
    Replies:
    4
    Views:
    8,362
    Babu Kalakrishnan
    Dec 8, 2004
  4. JC
    Replies:
    1
    Views:
    768
    Michael Rauscher
    Aug 9, 2006
  5. Ulf Meinhardt
    Replies:
    0
    Views:
    651
    Ulf Meinhardt
    Jul 7, 2009
Loading...

Share This Page