🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Multiline Static

#1191
From: Hal Brooks
Date: Wed, 04 Feb 2004 17:39
18 lines
1860 bytes
Hi all,

Sorry if this is a dumb question - I'm still fairly new to Swing.

Does Swing contain a multiline static control?  I have a JFrame
containing (among other things) a block of static text along the
bottom.  I'd like this block of text to resize nicely as the JFrame is
resized, automatically breaking onto multiple lines as necessary.  The
control itself doesn't have to grow vertically or anything - I can
make it tall enough to accomodate the maximum number of lines I expect
it to need.  It would just be nice if the control would handle the
wordwrap.

If there isn't such a thing, what's the best way to fake it?  Right
now I'm using a JTextArea, which does exactly what I want except that
the text is editable and the background color is wrong.  I considered
trying to turn off editing (how?) and changing the background color of
the JTextArea.  Is this the right way, or is there a better approach?
Technical Details
Message-ID: <40212ca3.43762096@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!priapus.visi.com!orange.octanews.net!news-out.visi.com!hermes.visi.com!news.octanews.net!feed2.news.rcn.net!rcn!news-out.cwix.com!newsfeed.cwix.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,692e8df434532b1d,start
X-Google-Attributes: gid111d45,public
X-Google-ArrivalTime: 2004-02-04 10:10:42 PST
From: dont@spamme.com (Hal Brooks)
Newsgroups: borland.public.jbuilder.java.swing
Subject: Multiline Static
Date: Wed, 04 Feb 2004 17:39:34 GMT
Message-ID: <40212ca3.43762096@newsgroups.borland.com>
X-Newsreader: Forte Free Agent 1.21/32.243
NNTP-Posting-Host: 69.34.113.48
X-Trace: newsgroups.borland.com 1075916373 69.34.113.48 (4 Feb 2004 09:39:33 -0800)
Lines: 19
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!priapus.visi.com!orange.octanews.net!news-out.visi.com!hermes.visi.com!news.octanews.net!feed2.news.rcn.net!rcn!news-out.cwix.com!newsfeed.cwix.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail