🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Horizontal scrollbar and JScrollPane

#12930
From: Uri Kerbel
Date: Wed, 21 Oct 1998 00:00
20 lines
1144 bytes
Hi

Could someone please tell me how to disable word wrap within a JTextPane.

I am using the following code to place a JTextPane within a JScrollPane:
JTextPane textpane = new JTextPane();
textPane.setMargin(new Insets(5,5,5,5));
scrollPane = new JScrollPane(textPane);

Everything works fine except for the fact that the text wraps onto the next
line each time and there is never a horizontal scrollbar.

Any help would be greatly appreciated.

TIA

Uri
--
uri@kalbi.demon.co.uk
http://www.kalbi.demon.co.uk
Technical Details
Message-ID: <908982380.10514.1.nnrp-01.9e988085@news.demon.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,173764e11d5dcf77,start
X-Google-Attributes: gid111d45,public
From: "Uri Kerbel" <uri@kalbi.demon.co.uk>
Subject: Horizontal scrollbar and JScrollPane
Date: 1998/10/21
Message-ID: <908982380.10514.1.nnrp-01.9e988085@news.demon.co.uk>
X-Deja-AN: 403570807
X-NNTP-Posting-Host: kalbi.demon.co.uk:158.152.128.133
X-Trace: news.demon.co.uk 908982380 nnrp-01:10514 NO-IDENT kalbi.demon.co.uk:158.152.128.133
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0
Newsgroups: borland.public.jbuilder.java.swing
X-Complaints-To: abuse@demon.net