Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #1246

How to print a JTextArea?

From "layne79" <layne79@THRWHITE.remove-dii-this>
Subject How to print a JTextArea?
Message-ID <1174409505.577869.303580@p15g2000hsd.googlegroups.com> (permalink)
Newsgroups comp.lang.java.gui
Date 2011-04-27 15:32 +0000
Organization TDS.net

Show all headers | View raw


  To: comp.lang.java.gui
Hello,
I'm trying to implement a printing mechanism for JTextArea but I have
a problem on extracting lines from it.
I used the xample found at http://java.sun.com/docs/books/tutorial/2d/printing/set.html
(PaginationExample class) but, instead of having available an array of
String (textlines), I have a JTextArea.
I need to replace the instruction

 g.drawString(textLines[line], 0, y);

at line 93

with another, taking lines from the textarea.

Dou you know how I can do that?

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.gui | Previous | NextNext in thread | Find similar | Unroll thread


Thread

How to print a JTextArea? "layne79" <layne79@THRWHITE.remove-dii-this> - 2011-04-27 15:32 +0000
  Re: How to print a JTextA "Dan Andrews" <dan.andrews@THRWHITE.remove-dii-this> - 2011-04-27 15:32 +0000
    Re: How to print a JTextA "layne79" <layne79@THRWHITE.remove-dii-this> - 2011-04-27 15:32 +0000
      Re: How to print a JTextA "Dan Andrews" <dan.andrews@THRWHITE.remove-dii-this> - 2011-04-27 15:32 +0000
    Re: How to print a JTextA "Brandon McCombs" <brandon.mccombs@THRWHITE.remove-dii-this> - 2011-04-27 15:32 +0000

csiph-web