Enabling Word-Wrapping and Line-Wrapping in a JTextArea Component : TextArea « Swing JFC « Java
- Java
- Swing JFC
- TextArea
Enabling Word-Wrapping and Line-Wrapping in a JTextArea Component
import javax.swing.JTextArea;
public class Main {
public static void main(String[] argv) {
JTextArea c = new JTextArea();
// Enable line-wrapping
c.setLineWrap(true);
c.setWrapStyleWord(false);
}
}
Related examples in the same category