Can anyone help me get my output to display in my textArea? When I click the button, when the program is running, it wll display console output since I am using System.out.printf, but now I want it to show in my GUI. Any help would be appreciated. Thank you.
jakhondi
0
Newbie Poster
Recommended Answers
Jump to PostReplace all your System.out.printf statements with add statements for your text area, using String's format method to format just like in printf.
Jump to PostCheck out the format method in the String class (that's how printf does its formatting). Use that to get a String containing all your formatted values, then add that to the text area.
Jump to PostThat's the idea, yes. That way it's a simple find/replace on your existing printf statements, and there's no need to change the stuff that's specifying the formats or the data. (You may want to fine-tune the formats when you see the output, but that's up to you.)
Just try it …
All 11 Replies
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
jakhondi
0
Newbie Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
jakhondi
0
Newbie Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
jakhondi
0
Newbie Poster
jakhondi
0
Newbie Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
jakhondi
0
Newbie Poster
jakhondi
0
Newbie Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.