Article View: borland.public.jbuilder.java.swing
Article #8892JScrollPane and JtextPane
From: JPBallet
Date: Wed, 21 Jun 2000 00:00
Date: Wed, 21 Jun 2000 00:00
21 lines
1168 bytes
1168 bytes
Hello, Who says me how can i show the first line of my text in a JTextPane with a JSCrollPane. When i insert all text from a text file, only the last lines appear and i am obliged to scroll up. I wish that the first line appear and then scolling down. An other question. How can i justify my text because: DefaultStyledDocument doc = new DefaultStyledDocument(); JTextPane textPane = new JTextPane(doc); textPane.setEditable(false); JScrollPane jSp = new JScrollPane(textPane); textPane.setStyledDocument(doc); SimpleAttributeSet attr = new SimpleAttributeSet(); ............................... StyleConstants.setAlignment(attr,StyleConstants.ParagraphConstants.ALIGN_CEN TER); don't work Thank you JP BALLET
Technical Details
Message-ID:
<8iqj34$i377@bornews.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,fd03c856ba6f12e6,start X-Google-Attributes: gid111d45,public From: "JPBallet" <jean-pierre.ballet@meteo.fr> Subject: JScrollPane and JtextPane Date: 2000/06/21 Message-ID: <8iqj34$i377@bornews.borland.com> X-Deja-AN: 637234148 Organization: METEO-FRANCE X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Newsgroups: borland.public.jbuilder.java.swing