How to draw components (image holders) over each other without "dirty tricks"?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Teemu_Lehtonen
Posted On:   Tuesday, June 26, 2001 05:50 AM

Basicly,the situation is this: - the environment is an AWT (1.1) applet for compability reasons. - The components to draw on are subclassed from java.awt.Component and java.awt.Container (lightweights,in other words). - The components hold image(s) (one of them implementing runnable for animations) , with each implementing it's own paint() method etc.. So the question is this: Is there a way to draw image containers/components over another without: a) breaking the layout management.(not absolutely necessary, this can be gotten around with a little bit of extra code) b) without having to resort to calling component paints from the container paint() method (that w   More>>


Basicly,the situation is this:

- the environment is an AWT (1.1) applet for compability reasons.

- The components to draw on are subclassed from java.awt.Component and java.awt.Container (lightweights,in other words).

- The components hold image(s) (one of them implementing runnable for animations) , with each implementing it's own paint() method etc..




So the question is this: Is there a way to draw image containers/components over another without:

a) breaking the layout management.(not absolutely necessary, this can be gotten around with a little bit of extra code)

b) without having to resort to calling component paints from the container paint() method (that worked, though feels like pretty inelegant solution.). a container paint method calling the paint methods of the components supposed to be drawn over it).



So basicly looking for a way to achieve a cleaner and more modular implementation than a brute-force paint() chaining.

   <<Less
About | Sitemap | Contact