I'm new to this forum, and have been programming java "actively" for a couple months or so now.
Basically, I'm currently writing a program with a GUI, which will among other things have a text-out put panel. I'm wondering, in general, if you want to output text to a gui (no input required in this case), in what way would you guys prefer to implement it?
First off I am right now using a JTextPane, but this might change. I've also tried to simply set the text with the setText() method, which works ok for the first line but doesn't appear to update when I use it a second time, and since the class has no redraw() method I'm a little at a loss.
Personally, I would LIKE to setup some kind of outputstream which is linked to the JTextPane component, but I'm finding it hard to find any good explanations on how to do this. I've got the impression I need to create an outputstream that writes to the Document of the JTextPane. Can anyone explain how I would do this, since this my preferred solution?
Thanks for your help.