Making a panel and its contents transparent

K

Kaish

Hi guys,

I'm coding an app that draws a little circle every time a user clicks
the mouse. This is fine and working. However, I want to be able to
toggle all the circles between visible and invisible.

The best way I can think of is to create one big panel and put all my
other panels containing their components inside it, then make a
checkbox that sets that big panel's opacity to false. I do this, but
the panel remains exactly the same.

I thought it might have been a repaint() problem, so I tried making
the panel not opaque at initialization, but all the components inside
still remain visible.

Am I missing something obvious?

Thanks,
Kaish
 
A

Andrew Thompson

I'm coding an app that draws a little circle every time a user clicks
the mouse. This is fine and working. However, I want to be able to
toggle all the circles between visible and invisible.

The best way I can think of is to create one big panel and put all my
other panels containing their components inside it, then make a
checkbox that sets that big panel's opacity to false. I do this, but
the panel remains exactly the same.

I thought it might have been a repaint() problem, so I tried making
the panel not opaque at initialization, but all the components inside
still remain visible.

Am I missing something obvious?

The Opacity of the panel does not apply
to things inside it, only things *behind*
it.

Andrew T.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top