Applet panel changing slow

I

Iceman

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!!!
 
M

Mickey Segal

Iceman said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top