[3221] in java-interest
Re: CardLayout and applet repaint()
daemon@ATHENA.MIT.EDU (Arthur van Hoff)
Fri Nov 3 15:07:54 1995
Date: Fri, 3 Nov 1995 09:48:36 -0800
From: Arthur.Vanhoff@Eng.Sun.COM (Arthur van Hoff)
To: suresh@thomtech.com
Cc: java-interest@java.Eng.Sun.COM
Hi Suresh,
Thanks for pointing this out. We've just figured out what the problem
is. It turns out that the X connection doesn't get flushed at
after your call to repaint. We're in the process of fixing this,
it will be part of the next release.
Have fun,
Arthur van Hoff
> It appears as though calling an applet's repaint() method does
> not call the paint() method of Panels with a CardLayout manager.
>
> Just for kicks, in the GraphicsTest demo, I modified ShapeTest
> to be Runnable thus:
>
> class ShapeTest extends Panel implements Runnable
>
> and added a run() method thus:
>
> public void run() {
> int i = 0;
> while (thread != null) {
> System.out.println("Shape: " + shape.toString() + " i: " + i++);
> applet.repaint();
> try {thread.sleep(5000); } catch (Exception e) {}
> }
> }
>
> Of course I also pass the applet reference to the constructor so
> the repaint can be called from run(). I get the string above in
> standard output but my debug in the paint() methods do not show up.
>
> The question is when a repaint is called, I assumed it just called
> the individual paint methods for all the embedded components.
> If one of the component has a CardLayout layout mgr, do *all* the
> cards in it get their paint() methods called? Or just the top card?
> It appears as though neither of this happens..
>
> Thanks in advance for any insight you may have.
>
> --Suresh
> -
> This message was sent to the java-interest mailing list
> Info: send 'help' to java-interest-request@java.sun.com
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com