Java Swing: JTextArea columns question

Posted by battousai622 on Stack Overflow See other posts from Stack Overflow or by battousai622
Published on 2010-06-05T21:53:49Z Indexed on 2010/06/05 22:02 UTC
Read the original article Hit count: 210

Filed under:
|
|

How do i put the text in specific columns with jTextArea?

        private javax.swing.JTextArea jTextArea1;
        jTextArea1.setColumns(4);
        jTextArea1.insert(price, 0);    //column 1
        jTextArea1.insert(cost, 0);    //column 2
        jTextArea1.insert(quantity, 0);       //column ect..
        jTextArea1.insert(itemName, 0);
        jTextArea1.insert("\n", 0);

© Stack Overflow or respective owner

Related posts about java

Related posts about swing