I need to add the ability for the user to toggle word wrap on the AWT Component TextArea. I've a couple of ways, but none of them seem to allow for the ability for me to allow a method to tell the textarea to toggle/untoggle word wrap. Is there a method that TextArea has? Thanks.
            Asked
            
        
        
            Active
            
        
            Viewed 1,044 times
        
    0
            
            
        - 
                    swing tag is for something? – nachokk Sep 16 '13 at 20:07
 - 
                    I'm using the Swing Window builder for Eclipse – Stefan Carlson Sep 16 '13 at 20:12
 - 
                    and why you are not using `javax.swing.JTextArea` ? – nachokk Sep 16 '13 at 20:13
 - 
                    Why AWT rather than Swing? See this answer on [Swing extras over AWT](http://stackoverflow.com/a/6255978/418556) for many good reasons to abandon using AWT components. If you need to support older AWT based APIs, see [Mixing Heavyweight and Lightweight Components](http://www.oracle.com/technetwork/articles/java/mixing-components-433992.html). – Andrew Thompson Sep 16 '13 at 20:24
 
1 Answers
0
            
            
        Use the javax.swing.JTextArea instead of the AWT Component. It has the method setLineWrap();.
        Stefan Carlson
        
- 372
 - 3
 - 7
 - 21