Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

jTextArea issue?

$
0
0
Hi,

I put a JTextArea on mu gui.But i can't print multiple lines on that?Why is that?.I have created a Item class and then created an Item object array in my gui.Then i print it on my jTextArea.This is my code i have put in my button.

jTextArea2.setText("Item Name"+"  |  "+"Price"+"  |  "+"Item Number");
        jTextArea2.setText("\n");
        for(int i=0;i<4;i++){
        jTextArea2.setText(""+item[i].toString());
        jTextArea2.setText("\n");}

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>