🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.jbuilder.java.swing
1 messages
1 total messages Started by Ron Thu, 11 Mar 2004 15:07
Transparency and redraw problems
#1272
Author: Ron
Date: Thu, 11 Mar 2004 15:07
36 lines
1750 bytes
I have a tiny project in which text of a JLabel on a panel displays the time
every second. No big deal. It works perfectly (it's just a test of
something). BUT, if I set the color of the label with the alpha setting,
like this:

 jLabel1.setBackground(new Color(173, 118, 216,10));

as opposed to

 jLabel1.setBackground(new Color(173, 118, 216));

the text in the alpha setting version does not redraw in that the text just
gets overwritten. I have tried inserting things like:

jLabel1.setText("");

or

jLabel1.UpdateUI();

all to no avail. Is there some other call or setting I need to make when
fiddling with the transparency of a swing component?

Thanks.

RON








_________________________________________________________
Black and White Photography: http://www.ronaldgansphotography.com
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads