Forums Register Login

Parameter passing to paint component

+Pie Number of slices to send: Send
Before flaming hold on. I'm not an absolute beginner, i know you can't do this the christian way but maybe there is a work-around it.
And sorry for not posting the entire project , i am sure you don't want to go through a lot of classes.

The issue:
I'm making a distributed application and the behavior i desire is like that : form the main application i can draw components that have their paint method in another jar file.
Short version : i want to get the size of a component from a delegated component










Note : this two classes are in separate java projects , and a type is generic (two or more entity's can have the same type)
This implementation works if the component is fully visible , but when i have a partially visible component's the shape is altered.

The only idea i got so far is to pass the component's size into the type's paint method but i got no clue how can i do that.

Any ideas or workarounds are welcome.
Thanks if you read this
Cheers
This tiny ad will self destruct in five seconds.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1162 times.
Similar Threads
repaint() method? Something's fishy...
Chess
draw a gameobject on playfield with OOP
Paint program
Related JTable Header
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 01:58:12.