Article View: borland.public.jbuilder.java.swing
Article #8406Re: Change properties
From: John P. McGrath
Date: Tue, 19 Sep 2000 00:00
Date: Tue, 19 Sep 2000 00:00
16 lines
935 bytes
935 bytes
On Mon, 18 Sep 2000 13:44:22 -0500, imacb wrote:
> How do I change properties of a JButton from another class
> in the same package.
Since the accessors for the properties of a JButton are public, you can
set the button properties from within the same package or from any other
package. In any case, you must have a reference to the button that you
want to change. Just use some code like this:
button.setForeground( Color.blue );
--
Regards,
John McGrath
Technical Details
Message-ID:
<MPG.1430ebc484e95573989b50@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<8q5n5v$5p53@bornews.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,266fb909e78314f8 X-Google-Attributes: gid111d45,public From: John P. McGrath <JPMcGrath@fast.net> Subject: Re: Change properties Date: 2000/09/19 Message-ID: <MPG.1430ebc484e95573989b50@forums.borland.com> X-Deja-AN: 671528731 References: <8q5n5v$5p53@bornews.borland.com> Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.swing