🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.computers.java
Article #1176

Re: Easy TextArea problem PLEASE HELP

#1176
From: Dave Postill
Date: Thu, 01 Jul 1999 00:00
24 lines
2036 bytes
[This followup was posted to comp.lang.java.gui, cc: the cited author, Michael Rowlands]

In article <930831978.803997@Chaos.es.co.nz>, on Fri, 2 Jul 1999 00:21:38 +1200, "Michael Rowlands"
<michaelrowlands@bigfoot.com> wrote:

> Hi I am making a simple text editor and am trying to implemented a font
> change when a user uses a drop down menu and selects the font i.e. Arial the
> way I have it now is
> 
> textArea.setFont(new Font(ari, Font.PLAIN, 12));
> 
> // ari is defined by "private String ari = new String("Arial");"
> 
> The program changes fonts but changes the whole textArea, when I only want
> to change the user selection in the textArea.

Use a JTextPane.

davep
--
Dave Postill                Investment Intelligence Systems Corp
Galaxy Support Leader               +44 (0) 171 628 6960 [voice]
<mailto:davep@iisc.co.uk>           +44 (0) 171 638 7528   [fax]
<mailto:dave.postill@pobox.com>          <http://www.iisc.co.uk>
Technical Details
Message-ID: <379268f2.186187092@news.demon.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <930831978.803997@Chaos.es.co.nz>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10a146,da84d4e138b1e98f,start
X-Google-Attributes: gid10a146,public
X-Google-Thread: 10d6db,da84d4e138b1e98f,start
X-Google-Attributes: gid10d6db,public
X-Google-Thread: 10fd6d,da84d4e138b1e98f,start
X-Google-Attributes: gid10fd6d,public
X-Google-Thread: 113ae9,da84d4e138b1e98f,start
X-Google-Attributes: gid113ae9,public
From: davep@iisc.co.uk (Dave Postill)
Subject: Re: Easy TextArea problem PLEASE HELP
Date: 1999/07/01
Message-ID: <379268f2.186187092@news.demon.co.uk>
X-Deja-AN: 496003851
Content-Transfer-Encoding: 7bit
X-NNTP-Posting-Host: iiscgate.iisc.co.uk:194.159.8.1
References: <930831978.803997@Chaos.es.co.nz>
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: abuse@demon.net
X-Trace: news.demon.co.uk 930834712 nnrp-09:14262 NO-IDENT iiscgate.iisc.co.uk:194.159.8.1
Organization: Investment Intelligence Systems Corp
MIME-Version: 1.0
Reply-To: davep@iisc.co.uk
Newsgroups: aus.computers.java,comp.lang.java.gui,comp.lang.java.help,comp.lang.java.programmer