如何在 JEditorPane 中关闭自动换行? [英] How to turn off word wrap in JEditorPane?

查看:35
本文介绍了如何在 JEditorPane 中关闭自动换行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

My JEditorPane 自动换行;我不想要那个.我想要的只是出现一个水平条,允许用户根据需要编写尽可能多的内容.我怎样才能做到这一点?我尝试了几种方法.我已经覆盖了 getScrollableTracksViewportWidth(),但这没有帮助.有谁知道如何关闭自动换行功能?

My JEditorPane automatically wraps words; I don't want that. All I want is a horizontal bar to appear that allows the user to write as much as desired. How can I do that? I have tried several methods. I have overridden the getScrollableTracksViewportWidth(), but that didn't help. Does any one know how I can turn off the word wrap?

推荐答案

试试这个http://java-sl.com/wrap.html

这篇关于如何在 JEditorPane 中关闭自动换行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆