🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: How does one ensure that transparent JLabel is displayed over top another JLabel

#1097
From: John McGrath [TeamB]
Date: Thu, 25 Mar 2004 22:38
36 lines
2368 bytes
On 3/24/2004 at 12:40:53 AM, Ted Byers wrote:

> I am having trouble with how JLabels are displayed.  

I think I understood the part about event handling, but what is wrong
with the way that they display?

> I have a background image loaded in one JLabel, and I created
> a second, smaller one to use to make a hotspot on the first.  
> I have everything working, including the ability to add an 
> event handler to the second (and actually have it invoked), 
> except that the second JLabel is supposed to have a different 
> mouse pointer than the first (so I can have an obvious visual
> cue for the availability of something to click for the area
> covered by the second JLabel).  Alas, this part isn't working
> in that the mouse pointer never changes.  I find this odd
> since I DO get my mouse event handlers for the second JLable
> invoked.

This sounds like you are just placing two labels in a panel and you
want to catch mouse events and set the mouse pointer for one of them.
Is that correct?

If so, it would help to know how you laid these two labels out in the
parent container.  What layout manager and constraints did you use and
in which order did you add them to the panel?  Do the two labels
overlap?

-- 
Regards,

John McGrath [TeamB]

---------------------------------------------------
Before sending me e-mail, please read:
    http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID: <40635f50$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <40611e78$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,996c15d51938f6ca
X-Google-Attributes: gid111d45,public
X-Google-ArrivalTime: 2004-03-25 14:40:12 PST
From: "John McGrath  [TeamB]" <ng-b@JPMcGrath.net>
Subject: Re: How does one ensure that transparent JLabel is displayed over top another JLabel
Newsgroups: borland.public.jbuilder.java.swing
References: <40611e78$1@newsgroups.borland.com>
User-Agent: XanaNews/1.16.1.11
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-15
NNTP-Posting-Host: 151.197.242.55
Message-ID: <40635f50$1@newsgroups.borland.com>
Date: 25 Mar 2004 14:38:08 -0800
X-Trace: newsgroups.borland.com 1080254288 151.197.242.55 (25 Mar 2004 14:38:08 -0800)
Lines: 36
X-Authenticated-User: jpmcgrath
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail