printing information in a gui

Hi I want to be able to do a printout of some information that I have in gui. Does any body know any code that I could use or if there is any documentation on how to do it. I know that you can do printouts of tables but I haven't been able to find any documentation on print outs of information contained in a gui.

I don't want to do print screen because ideally I would like to transfer the infromation that I have in some jtextfields at the top of the page into jtextfields at the bottom of the page that are contained in jpanel and then print out the contents of the jpanel, which would contain all of the data, but I would be able to make it look more presentable for the use that I have.

PS I do not mean can I display information on the gui (i.e. println) I mean a literal paper print out of the information contained in the gui.

[856 byte] By [morganista] at [2007-11-27 11:59:11]
# 1

Read here: http://java.sun.com/docs/books/tutorial/2d/printing/index.html

Another tip would be to transfer your text content to some JTextArea (for simple formatting) or a JTextPane or JEditorPane (for more sophisticated printing using HTML or RTF) and print that instead.

You could additionally search online for third party printing libraries to use in your app.

ICE

icewalker2ga at 2007-7-29 19:24:09 > top of Java-index,Desktop,Core GUI APIs...
# 2

Thank you I appreciate your quick response Ice. Can I say thank you in the posts or is it deemed as inappropriate. Any way thanks the link that you sent me was very useful.

Morgan.

morganista at 2007-7-29 19:24:09 > top of Java-index,Desktop,Core GUI APIs...
# 3

> Can I say thank you in the posts or is it deemed as inappropriate?

Most appropriate. Helps others to know whether the solution provided solves the problem and hence there wont be a need to start another thread on the same issue or continue to ask the same questions when the solution is right infront of them

ICE

icewalker2ga at 2007-7-29 19:24:09 > top of Java-index,Desktop,Core GUI APIs...