I am writing a Icon class (extends Canvas)
which will be added to a panel. The problem
is that the Icon overrides the painted panel
with a white rectangle. I want the background
of the Icon to allow the painted panel
behind to show through
any ideas? I've tried copying a section of the
parent canvas, but I can't find a way to
draw it on the Icon canvas.
Brendan Whelan wrote in message ...
On Wed, 24 Mar 1999 21:23:30 -0000, in <zIcK2.1356$kh3...@news.indigo.ie>
"Brendan Whelan" <bhwh...@indigo.ie> wrote.....
> Does anyone have any ideas on how
> to make a canvas background transparent?
you can't make a java.awt.Canvas transparent;
it's an opaque operating system window. Use
java.awt.Component as your base class
-- PGPfingerprint: BC01 5527 B493 7C9B 3C54 D1B7 248C 08BC --
_______ {pegwit v8 public key =581cbf05be9899262ab4bb6a08470}
/_ __(_)__ ___ ___ {69c10bcfbca894a5bf8d208d001b829d4d0}
/ / / / _ \/ -_|_-< www.geocities.com/SiliconValley/1394
/_/ /_/_//_/\__/___/@windsong.demon.co.uk PGP key on page
### end pegwit v8 signed text
aa0188cae0aa216a16681a473fb8841b587df35896ee6dc52cf93cc8d685
761cf98dab3593e0b5b051b43ab808e490c41763762b0140095c669f5398
That worked!
By using a component class and making sure that
the paint method of both the component and
container panel called the superclass paint
method, the background shows through.
Thanks for the help everyone!
B.