Paint method problem
Ive created an applet in java for which displays images on a canvas, it also has panels for the buttons and components. I have used the paint method for displaying the images. The problem I'm haveing is that when I run the applet the panels are painted over, such that only the buttons are visible but the panels borders are just painted over.
maybe you have something in the paint methond before you painted the panals that is painting over them maybe look and move stuff around
Been there, never done that...
Tie Ninja is absolutely right, but getting around this problem is difficult...
Ive coded java for 10 years and I have never been able to do that properly, but, if you manage then please let me know how you did it.
Until then I proclaim (hehe) :
You should not add standard components to a container where you have
overridden the paint method.
I advise you to set up your applet with a borderlayout, and a panel in south
for your buttons and in the center you add your own panel extension (where
you have overridden the paint method).
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center