由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - How to wrap line at specific position?
相关主题
如何控制文本输入的左界限?比如不准到上一行,不准回到第一个Re: help with JTextArea
design questionsolvedRe: how to change the input mode?
TextComponentoverride/overload/overwrite in Java
How to set tab set of PRE in JEditorPane?怎样才能Firefox add-on和java程序之间传递数据
请问jeditorpane怎末才能显示rss or xml?如何在TextArea里面画位图
Re: JTextArea的内容不滚动JTextArea 生成之后怎么知道有多少行,列?
Re: AWT 和 SWING 在程序应用中有什么区别?JTextArea行间距如何设定?
如何输出TXT文件?如何强令JTextArea显示最末一行
相关话题的讨论汇总
话题: wrap话题: position话题: line话题: want
进入Java版参与讨论
1 (共1页)
h******b
发帖数: 312
1
I want to wrap text in an editor area at a specific position, I have a
configure dialog to ask user specify line wrap at, say, 60 characters or 90
characters. Then I want the text to be displayed like that.
I can use JTextArea/JTextPane/JEditorPane, but no luck. setColumn() method
won't do it because it actually changed the size of the component, which I
don't want. I also tried to use styleddocument and override insert() method,
but in that way I have to insert new line characters which is not
g*****g
发帖数: 34805
2
did you setLineWrap(true)?

【在 h******b 的大作中提到】
: I want to wrap text in an editor area at a specific position, I have a
: configure dialog to ask user specify line wrap at, say, 60 characters or 90
: characters. Then I want the text to be displayed like that.
: I can use JTextArea/JTextPane/JEditorPane, but no luck. setColumn() method
: won't do it because it actually changed the size of the component, which I
: don't want. I also tried to use styleddocument and override insert() method,
: but in that way I have to insert new line characters which is not

h******b
发帖数: 312
3
yes, I did setLineWrap(true); but I want also it wrap at a specified position,
like this:
_______________________________________________________________
|heheheheheheheheheheheeeeeeeeeeeeeeeeeeeeee |
|heheheheheheheheheheheeeeeeeeeeeeeeeeeeeeee |
|heheheheheheheheheheheeeeeeeeeeeeeeeeeeeeee |
|heheheheheheheheheheheeeeeeeeeeeeeeeeeeeeee |
|heheheheheheheheheheheeeeeeeeeeeeeeeeeeeeee

【在 g*****g 的大作中提到】
: did you setLineWrap(true)?
h******b
发帖数: 312
4
再问一遍!
//papaya

position,
this:
method
I

【在 h******b 的大作中提到】
: yes, I did setLineWrap(true); but I want also it wrap at a specified position,
: like this:
: _______________________________________________________________
: |heheheheheheheheheheheeeeeeeeeeeeeeeeeeeeee |
: |heheheheheheheheheheheeeeeeeeeeeeeeeeeeeeee |
: |heheheheheheheheheheheeeeeeeeeeeeeeeeeeeeee |
: |heheheheheheheheheheheeeeeeeeeeeeeeeeeeeeee |
: |heheheheheheheheheheheeeeeeeeeeeeeeeeeeeeee

1 (共1页)
进入Java版参与讨论
相关主题
如何强令JTextArea显示最末一行请问jeditorpane怎末才能显示rss or xml?
JTextAre如何预定行列数目Re: JTextArea的内容不滚动
GUI问题Re: AWT 和 SWING 在程序应用中有什么区别?
JTextArea做console窗口的目前结果和问题如何输出TXT文件?
如何控制文本输入的左界限?比如不准到上一行,不准回到第一个Re: help with JTextArea
design questionsolvedRe: how to change the input mode?
TextComponentoverride/overload/overwrite in Java
How to set tab set of PRE in JEditorPane?怎样才能Firefox add-on和java程序之间传递数据
相关话题的讨论汇总
话题: wrap话题: position话题: line话题: want