Article View: borland.public.jbuilder.java.swing
Article #1089How does one ensure that transparent JLabel is displayed over top another JLabel
From: Ted Byers
Date: Wed, 24 Mar 2004 05:40
Date: Wed, 24 Mar 2004 05:40
19 lines
1941 bytes
1941 bytes
I am having trouble with how JLabels are displayed. 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. But the statement "jLabel2.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));" doesn't work, regardless of whether I put it in jbInit (where it belongs) or in the mouseover event handler. Any ideas regarding what is awry? Thanks, Ted
Technical Details
Message-ID:
<40611e78$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-08!supernews.com!newshosting.com!nx02.iad01.newshosting.com!news2.euro.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,996c15d51938f6ca,start X-Google-Attributes: gid111d45,public X-Google-ArrivalTime: 2004-03-23 21:39:25 PST From: "Ted Byers" <r.ted.byers@sympatico.ca> Newsgroups: borland.public.jbuilder.java.swing Subject: How does one ensure that transparent JLabel is displayed over top another JLabel Date: Wed, 24 Mar 2004 00:40:53 -0500 Lines: 21 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 65.95.240.180 Message-ID: <40611e78$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1080106616 65.95.240.180 (23 Mar 2004 21:36:56 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-08!supernews.com!newshosting.com!nx02.iad01.newshosting.com!news2.euro.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail