🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: JButton shapes

#10963
From: Rich Wilkman
Date: Thu, 22 Jul 1999 00:00
49 lines
2234 bytes
There are (or were) examples of this on the javasoft site.  It's one of
the things they liked to show off when they released JFC.  I think a
search on "polygon" at the Javasoft site would get you started.  There
were also some references (sans source) in the whitepapers on
lightweight compoments.

-Rich

savithari@my-deja.com wrote:
> 
> Tor,
>    Do you by any chance have an example of this ?
> 
> Thanks
> -narahari
> 
> n article <u7lnvg5yz.fsf@sds.no>,
>   Tor Iver Wilhelmsen <tor.wilhelmsen@sds.no> wrote:
> > David <david.v.clark@lmco.com> writes:
> >
> > > Has anyone created round JButtons?  I would like the functionality
> of a
> > > JButton, but would like to be able to create different shapes.  I
> am new
> > > to graphics in Java and don't really know where to start.
> >
> > Subclass JButton, overriding paintBorder() (to paint
> > differently-shaped borders) and contains(x,y) (to tell Java whether a
> > click inside the Component's rectangle should count as a click on the
> > component itself, or if it's outside the shape).
> >
> 
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.

-- 

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Rich Wilkman
Quality Assurance Manager
Borland JBuilder Team

If you see something that looks like an opinion up there,
it's mine and mine alone.

Mail sent to me from the newsgroups won't bounce but will
be ignored.  If I have time, I'll respond, but you  have
a better chance if you confine your posts to the newsgroups
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Technical Details
Message-ID: <3797314D.1A400A04@inprise.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3793564C.6249F864@lmco.com> <u7lnvg5yz.fsf@sds.no> <7n5evv$96c$1@nnrp1.deja.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,8575a0a7ae35ef41
X-Google-Attributes: gid111d45,public
From: Rich Wilkman <rwilkman@inprise.com>
Subject: Re: JButton shapes
Date: 1999/07/22
Message-ID: <3797314D.1A400A04@inprise.com>
X-Deja-AN: 504032888
Content-Transfer-Encoding: 7bit
References: <3793564C.6249F864@lmco.com> <u7lnvg5yz.fsf@sds.no> <7n5evv$96c$1@nnrp1.deja.com>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing