Article View: borland.public.jbuilder.java.swing
Article #11029Re: JButton shapes
From: Tor Iver Wilhelmsen
Date: Tue, 20 Jul 1999 00:00
Date: Tue, 20 Jul 1999 00:00
10 lines
947 bytes
947 bytes
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).
Technical Details
Message-ID:
<u7lnvg5yz.fsf@sds.no>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3793564C.6249F864@lmco.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: Tor Iver Wilhelmsen <tor.wilhelmsen@sds.no> Subject: Re: JButton shapes Date: 1999/07/20 Message-ID: <u7lnvg5yz.fsf@sds.no> X-Deja-AN: 503031303 Sender: towi@SDSA1761 References: <3793564C.6249F864@lmco.com> Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.swing