Hi,
If you want to print a file to printer, you need use java.awt.print
package.
Here is a demo in Java DOC.
///
PrintJob pjob = getToolkit().getPrintJob(this,
"Printing Test", null);
if (pjob != null) {
Graphics pg = pjob.getGraphics();
if (pg != null) {
canvas.printAll(pg); //Suppose canvas is
the what you want to print
pg.dispose(); // flush page
}
pjob.end();
///
For more information, you should refer to the cooresponding class
specification in Java DOC
Hope it can help you.
--tengnan
-----Original Message-----
From: kumar jaya [mailto:[EMAIL PROTECTED]]
Sent: 2000?11?20? 15:49
To: [EMAIL PROTECTED]
Subject: Again java.awt.print
hello,
very sorry i am not able to understand.
i have one file suppose(sometxt.txt).
and i want to print it through printer which is
connected.
is there any classes and methods.
i have searched in java.awt.print.
but i dont feel its gives correct answer.
please help me.
this is only part missing in my project
(if possible u can give the code also)
thanx in advance
jayakumar
--- "Teng, Nan" <[EMAIL PROTECTED]> wrote:
> First, read the file into memory.
> Then use the .print or .println to the destination.
>
> -----Original Message-----
> From: kumar jaya [mailto:[EMAIL PROTECTED]]
> Sent: 2000?11?20? 13:14
> To: [EMAIL PROTECTED]
> Subject: Re: Result Set
>
>
> hi jimmy,
>
> with the ordinary resultset u cant find the no of
> rows in u'r resultset. for getting this u have to go
> for scrollable resultset so that u can find the
> recordcount and u can move forward & backward also.
>
>
> ( i need one help )
> i want to print a file using java.i have searched
> for
> java.awt.print but i dont know how to use it to
> print
> a file .
> thanx in advance
> jayakumar
>
>
>
>
>
>
>
>
>
> --- Jimmy Kurian <[EMAIL PROTECTED]> wrote:
> > Hi,
> > Is there any function to know how many rows are
> > there in a Resultset ?
> > ie I want to know how many rows I got in a
> resultset
> > when I executed a
> > "Select" statement. ( I don't want to do another
> > "Select count(*) ..."
> > statement because I'm making another access to the
> > database)
> > Thanks in advance
> > Jimmy
> >
> >
>
___________________________________________________________________________
> > To unsubscribe, send email to
> [EMAIL PROTECTED]
> > and include in the body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives:
> >
>
http://archives.java.sun.com/archives/servlet-interest.html
> > Resources:
> >
>
http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help:
> http://www.lsoft.com/manuals/user/user.html
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Calendar - Get organized for the holidays!
> http://calendar.yahoo.com/
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED]
> and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives:
>
http://archives.java.sun.com/archives/servlet-interest.html
> Resources:
>
http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help:
> http://www.lsoft.com/manuals/user/user.html
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED]
> and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives:
>
http://archives.java.sun.com/archives/servlet-interest.html
> Resources:
>
http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help:
http://www.lsoft.com/manuals/user/user.html
__________________________________________________
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html