Hi, I was having some fun with this bit of code, it's sort of meaningless, just testing things out. It should print a string array of five dates in a JTextArea, but it will only print the last one. Why is that? How do I get it to print the whole array of dates?
humanum errare est.
posted 13 years ago
The problem is this line: scribbleField.setText(displayText); - setText() overwrites whatever is already there. To append a string to the existing text try: scribbleField.setText(scribbleField.getText() + displayText);