I haven't looked at your source code - on dial up from home and doesn't
support... yada yada yada...

But, in AWT, the trick to this was to override the "public void update(
Graphics g )" method to do nothing, or to call the paint method, e.g.

        public void update( Graphics g ) {
                paint( g );
        }

However, I don't know if you're still meant to do this or whether Opaque
does it for you.

BTW - it occurs to me, that it might be better if you had a third
component, which was the parent of the both the components.  You
would^H^H^H^H^Hshould have much more control then.

*shrug*

Sorry if I'm talking a load of tosh.

Best Regards

Nicholas

> On Wed, 2 May 2001, Vella, John wrote:

> I have a repaint problem that involves needing to manage the repaint of one
> component entirely from the repaint code of another component. For
> architectural reasons of my app, I have the following layout
> configuration(both components are just extended JPanels):
>     ______________________________
>    [ Comp A   |     Comp B        ]
>    [__________|___________________]
> 
> In the figure above, Comp B draws various text strings, some of which need
> to straddle the boundary between Comp A and itself. This means Comp B has to
> draw "outside" of itself. I can't seem to figure out how to prevent Swing's
> RepaintManager from clearing the background of Comp A(even after setting
> Comp A to being opaque).
> 
> I've attached a simple test app that shows this problem. The goal is to
> modify the code to allow the text strings that are drawn outside of the
> middle component to be updated while you drag the scrollbar.
> 
> IS ANYONE UP TO THIS CHALLENGE?
> 
> Thanks,
> 
> John
>  <<foo.java>> 
> 

===========================================================================
Nicholas Wright    Imperial Software Technology    Senior Software Engineer 
---------------------------------------------------------------------------
Email : [EMAIL PROTECTED] or [EMAIL PROTECTED]
Berkshire House                        120 Hawthorne Ave, #101
252 Kings Road                         Palo Alto
Reading RG1 4HP United Kingdom         California 94301 USA
Tel: +44 118 958 7055                  Tel: 650 688 0200
FAX: +44 118 958 9005                  FAX: 650 688 1054
===========================================================================  
******              VISAJ AT http://www.ist.co.uk/visaj              ******
===========================================================================

_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing

Reply via email to