G
Guest
I'm (still...) working on some inherited code and am trying
to fix a bug where two JInternalFrames that contain JComponents
used as "canvases" draw on each others border's when they
overlap. Each JComponent implements it's own paintComponent()
method, which calls super.paintComponent() and then draws
itself. The two components won't draw on each other, but
if the frames overlap the lower one freely messes up any
part of the overlying frame *except* it's drawing canvas.
(Hope that all made sense, a picture would help I guess but
I've no place to put one right now)
I've found plenty of discussion on the issue various places
on the net, including SUN, but no definitive piece of example
code or clear explanation of how to fix it.
The only way I can see now if to get from the containing
JDesktopPane the locations of all objects above either
JInternalFrame and build a clipping list. This seems like
an awful lot of work, is there something simpler I'm
missing?
Thanks,
--arne
DISCLAIMER: These opinions and statements are those of the author and
do not represent any views or positions of the Hewlett-Packard Co.
to fix a bug where two JInternalFrames that contain JComponents
used as "canvases" draw on each others border's when they
overlap. Each JComponent implements it's own paintComponent()
method, which calls super.paintComponent() and then draws
itself. The two components won't draw on each other, but
if the frames overlap the lower one freely messes up any
part of the overlying frame *except* it's drawing canvas.
(Hope that all made sense, a picture would help I guess but
I've no place to put one right now)
I've found plenty of discussion on the issue various places
on the net, including SUN, but no definitive piece of example
code or clear explanation of how to fix it.
The only way I can see now if to get from the containing
JDesktopPane the locations of all objects above either
JInternalFrame and build a clipping list. This seems like
an awful lot of work, is there something simpler I'm
missing?
Thanks,
--arne
DISCLAIMER: These opinions and statements are those of the author and
do not represent any views or positions of the Hewlett-Packard Co.