🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Can I make an invisible control?

#1156
From: Gillmer J. Derge (TeamB)
Date: Fri, 19 Mar 2004 15:39
34 lines
1892 bytes
Ted Byers wrote:
> Here is what I need (and could do almost blindfolded in Borland's C++
> Builder).

Other than the part where you mention a cursor, it sounds like you just 
want a JLabel.

> I need a component that could hold a bitmap, 

label.setIcon(bitmap); // not a Windows .BMP

> and which can have a size set
> independantly of the size of the bitmap, 

label.setPreferredSize(size);
label.setMinimumSize(size); // may also be necessary
label.setMaximumSize(size); // may also be necessary

 > even if it doesn't have bitmap data and so would be invisible

label.setIcon(null);
label.setText(""); // null might work too but probably not
label.setOpaque(false);

> And this component ought to respond to all mouse events 

label.addMouseListener(mouseListener);

> and have its own cursor.  

Huh?  Is this supposed to be a text editing component?

-- 
Gillmer J. Derge (TeamB)
Technical Details
Message-ID: <405b1413$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <405b119a$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,713e84ee88d10114
X-Google-Attributes: gid111d45,public
X-Google-ArrivalTime: 2004-03-19 07:40:23 PST
Date: Fri, 19 Mar 2004 10:39:02 -0500
From: "Gillmer J. Derge (TeamB)" <spam@gillmerderge.com>
User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing
Subject: Re: Can I make an invisible control?
References: <405b119a$1@newsgroups.borland.com>
In-Reply-To: <405b119a$1@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 64.185.133.13
Message-ID: <405b1413$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1079710739 64.185.133.13 (19 Mar 2004 07:38:59 -0800)
Lines: 34
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail