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 etc..
jTextArea1.insert(itemName, 0);
jTextArea1.insert("\n", 0);
The best approach is to use a JTable.
But if you really want to use a text cmponent you can use a JTextPane and play with tabs. See my example in JTextPane Tab Size.