> Hello,
> I'm trying to implement a printing mechanism for JTextArea but I have
[quoted text clipped - 11 lines]
>
> Dou you know how I can do that?
Layne,
Ever since JDK1.6 the JTextArea has a method called getPrintable that
it gets from JTextComponent. You could start there instead of writing
your own printable.
Cheers,
Dan Andrews
---------------------------
http://www.ansir.ca
layne79 - 21 Mar 2007 10:53 GMT
Dan Andrews ha scritto:
> > Hello,
> > I'm trying to implement a printing mechanism for JTextArea but I have
[quoted text clipped - 17 lines]
> it gets from JTextComponent. You could start there instead of writing
> your own printable.
Sorry but I can't use JDK 1.6
May you suggest an alternative?
Thank you and bye.
Dan Andrews - 21 Mar 2007 18:54 GMT
> Sorry but I can't use JDK 1.6
> May you suggest an alternative?
> Thank you and bye.- Hide quoted text -
Personally, I'd likely implement a Printable that used the text area's
paint component method. The drawback is that you would need to
calculate the page breaks. There are lots of examples on the internet.
Here is a link to one solution that you can get to by a google for the
terms Printable JTextArea.
http://forum.java.sun.com/thread.jspa?forumID=57&threadID=212065
Cheers,
Dan Andrews
---------------------------
http://www.ansir.ca
Brandon McCombs - 22 Mar 2007 03:54 GMT
>> Hello,
>> I'm trying to implement a printing mechanism for JTextArea but I have
[quoted text clipped - 15 lines]
>
> Ever since JDK1.6 the JTextArea has a method called getPrintable that
Ever since? You say that like 1.6 has been out for ages when in fact
it's the latest version available and only came out within the last few
months.
> it gets from JTextComponent. You could start there instead of writing
> your own printable.
[quoted text clipped - 3 lines]
> ---------------------------
> http://www.ansir.ca