🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #1272

Transparency and redraw problems

#1272
From: 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
Technical Details
Message-ID: <405080c6$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,1170ac1a962a161c,start
X-Google-Attributes: gid111d45,public
X-Google-ArrivalTime: 2004-03-11 07:10:33 PST
Reply-To: "Ron" <rgans@nospamRonaldgansphotographyDOTcom>
From: "Ron" <rgans@nospamRonaldgansphotographyDOTcom>
Newsgroups: borland.public.jbuilder.java.swing
Subject: Transparency and redraw problems
Date: Thu, 11 Mar 2004 10:07:51 -0500
Lines: 38
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 161.233.20.179
Message-ID: <405080c6$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1079017670 161.233.20.179 (11 Mar 2004 07:07:50 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail